Friday, January 4, 2008

rsync - Once again why Linux is better.

Linux has this little easy command called rsync. Basically what it did for me today was went through all the music on my computer, compared it with the saved music on my external hard drive, and then copied anything over to the external that wasn't already there.

See, I use my laptop to listen to music and when I get a new cd I put it on my laptop. But then I need to make sure my external is keeping a good/up-to-date backup of all my music in case something happens to my laptop.

Thanks to linuxquestions.com I found a quick and easy way to do that with rsync.

The command I used was:

rsync -avuz /home/awesome/Music/ /media/My\ Book/My\ Music/
(laptop music dir) (ext. music dir)


rsync is the command.
"a" option archives the files to the new directory
"v" verbose?
"u" update - this causes it to skip files that are newer on the destination - that way you don't copy old info over new info (in my case this is a "just in case")
"z" compresses files during data transfer - to speed transfer


Wow, that's excellent.

No comments: