Syntaxy

...now browsing by category

Useful commands/scripts to remember.

 

mysqldump with “reserved keywords”

Monday, June 14th, 2004

Ran into this today. I mysqldumped a database, and tried to import it again. The import failed with a SQL error. I was pretty annoyed that MySQLs own tools were generating invalid SQL until I dug into a little more. Turns out, one of my fields was named “usage”, which is a MySQL reserved keyword. So, I used the following mysqldump syntax to get a proper export.

mysqldump –password -c –allow-keywords databasename > output.sql

Zaurus and Kismet

Tuesday, May 25th, 2004

I found the following on here and could never remember it, so I’ll put it here, since that’s what this is for.

cardctl scheme CardResume
cardctl scheme qpewlan3

cardctl scheme default

tgz to gz

Monday, May 17th, 2004

If, for some reason, you have a text file that has been saved as a tarred and gzipped file, use the following to gunzip/untar and gzip on the fly:

tar xvzfO $TARFILE | gzip > ./$NAME.gz

Page optimized by WP Minify WordPress Plugin