| |
Monday, April 13. 2009Adding date to crontab mysqldump
After mangling some crontabs commands, I finally got the date into mysql exports.
mysqldump -u database-user -h localhost -pdatabase-password database | gzip -9 > /path/to/backup/directory/database-data`date +%m%d%y`.sql.gz This command will dump the database, gzip it then add the date to the exported file. Basically if you had problems adding a date to the export file you most likely forgot to add a '\' before the %m, %d, or the %y. edit: well it looks like my blog is actually removing the \ before the %m%d%y in the command. It should look like this minus the spaces... \ %m \ %d \ %y Thursday, April 2. 2009Gigabyte GA-9IVDP
Google finally revealed to the public what their servers are like on the inside. Surprisingly, from a technology standpoint, their servers are using x86 chips with a mixture of AMD and Intel chips. I guess from Google's perspective, they would rather have quantity over quality. Not that x86 chips are bad but with x86-64 available, x86 systems are the most cost effective.
Attached to each Gigabyte GA-9IVDP (The motherboard's model number might actually be GA-91VDP I can't say if it is a 1 or a capital i) motherboard are two hard drives, which look to be Hitachi Deskstars, eight chips of memory, maximum of 4 gigs each server since the operating system is x86, and a 12 volt battery as their own Uninterruptible Power Supply (UPS). Google explains that designing their servers with their own UPS battery is more efficient then having ten on one single UPS. Pretty interesting... The real question with the hardware is whether or not Google's servers actually use the same exact parts. Do they know something most of us don't know about the reliability of Hitachi Deskstars? Or how about the Magnetek Power supplies? Perhaps it's time to dig up some stats for this hardware. Thanks cnet for the info. Friday, February 13. 2009
Purchase Brothers - Escape from City ... Posted by Kevin Harrison
at
16:20
Comments (0) Trackbacks (0) Purchase Brothers - Escape from City 17 - High Definition
Check out this awesome high-definition live remake of half-life 2. It is called Escape from City 17, hopefully there is a few more episodes or a full trailer in the works. It is made by a Canadian company called Purchase Brothers. Unfortunately for them, purchasebrothers.com wasn't quite up to the challenge of making the digg front page and the purchasebrothers website has been shutdown for excess bandwidth.
Aside from that, I can't wait to see their second installment of live-action half-life. Tuesday, February 10. 2009Linux TAR Command
create:
tar -cvf mystuff.tar mystuff/ tar -czvf mystuff.tgz mystuff/ extracting: tar -xvf mystuff.tar tar -xzvf mystuff.tgz testing/viewing: tar -tvf mystuff.tar tar -tzvf mystuff.tgz Note that .tgz is the same thing as .tar.gz Tar "tars up" a bunch of files into one "tar-file" gzip is compression, but only works on one file, so the entire "tarfile" is compressed. Also when creating a tar or cpio backup, never, never, never use an "absolute" path -- you have been warned; also linux tar warns you of this too. The problem is that when you want to unpack, you cannot choose where to unpack to, you will be forced to unpack to the "same" absolute path. When creating a tar or cpio you should change the the appropriate directory and tar from there. Also when creating a tar or cpio it is general good practice to tar up a directory (appropriately named) which contains your files, rather than just the files. This is good courtesy to anyone unpacking your tarfile. If you would like to create a tar file while saving ownership and permissions, add the "p" flag. Creating and saving ownership and permissions: tar -cpvf mystuff.tar mystuff/ tar -cpzvf mystuff.tgz mystuff/ Also take note of the following commands: gzip gunzip cat zcat bzcat bzip2 bunzip2 zgrep bzgrep (cd /mydir && tar -czf - .)|(cd /destdir && tar -xzvf -) tar -czf - . | ssh user@dest "(cd /destdir && tar -xzvf -)" (cd /mydir && tar -czf - .) | ssh user@dest "(cd /destdir && tar -xzvf -)" Errors: If you receive an error such as the following: [root@localhost test]# ssh user@dest "(cd /rh62/home/kernel && tar -czvf - linux-2.2.22.tar.bz2)"|tar -xzvf - Then try leaving off the compression as follows: [root@localhost test]# ssh user@dest "(cd /rh62/home/kernel && tar -cvf - linux-2.2.22.tar.bz2)"|tar -xvf - Spaces in your filenames? Having fun with spaces in the filename or directory name? Here's your answer: find . -type f -name '*jpg' | grep " " | while read REPLY; do Bonus: find . -type f | while read REPLY; do |
QuicksearchArchivesSyndicate This Blog |
