The University of Queensland Homepage
Matthew Smith Library Systems Programmer

Archive for the 'Command Line' Category

Rsync and Flash Drives

I have been using a flash drive to transfer podcast files form home to work. In the morning I hit refresh in iTunes to get all my podcasts and then when they’re downloaded I copy the Podcasts dir from the iTunes folders on the harddrive. I decided to try using rsync to only copy the changed files to the flash drive but when I ran the command rsync -av source dest, it took as long as just doing a full copy (possibly longer).

I found that cp -Rnvp source dest (MacOS / BSD) was a lot quicker. I think this might be because rsync uses temp files on the flash drive and does a lot of reading and verifying while writing. I assume cp just checks the timestamps and skips over the existing files where as rsync tries to get checksums and things.

At work I have a win32 binary of the GNU cp command that I use with different flags ( cp -Ruvp ) to copy from the flash drive to the iTunes dir.