mysqldump --no-create-info -uxxxx -pxxxx Database ATable | gzip -9 > xxxx.sql.gz
zcat xxxx.sql.gz | mysql -uxxxx -pxxxx Database
mysqldump --no-create-info -uxxxx -pxxxx Database ATable | gzip -9 > xxxx.sql.gz
zcat xxxx.sql.gz | mysql -uxxxx -pxxxx Database
Tags: admin, backup, cli, command, dump, linux, mysql, mysqldump, restore, server, sysadmin, zcat
Posted in Code, Systems | No Comments »
A guy named JR posted this nifty piece of code to help color CLI output in bash from PHP scripts
And this user on GitHub cleaned it up a bit and posted a Gist of it.
Tags: class, cli, Code, color, command, console, gist, php
Posted in Code, Systems | No Comments »
sed is a wonderful tool. Just used this command today to remove most of the whitespace from a file.
sed 's/ //g' test.txt > test2.txt
Tags: cli, command, linux, manipulation, sed, systems, text
Posted in Code, Systems | No Comments »
Vista and Windows 7 DVDs include a utility to make a USB hard drive bootable so you can install from them.
The command for this is:
[code]E:\boot\bootsect.exe /nt60 F:[/code]
where E is the DVD drive, and F is the hard drive that you want bootable.
Once you’ve done this, you can copy the contents of the DVD to the USB hard drive, and install from that. Great for when you didn’t buy a SATA DVD drive for your new computer 😀
Tags: cli, command, usb, vista, windows
Posted in Systems | No Comments »