The easy way would be to just use rsync to get everything up to date (see `man rsync`). That isn't exactly what you asked, but it basically accomplishes the same thing. Depending on the options you pass, it will copy over any new files that are not on your backup drive and will overwrite any updated files (based on the filesize or modification time). If you're worried about keeping the originals, rsync can also copy over the new, updated files while renaming the old files to prevent them from being overwritten (see the -b, ie --backup option). If you have files on your backup drive that are no longer present on your PC that you don't want deleted, make sure to NOT use the --delete option, which would delete any files on the backup drive that are not on the PC.
Last edited by T3slider; 11-10-2008 at 10:36 PM.
|