Help with CLI commands

I have a few TBs of data that I copied from one drive (source folder) onto another (destination folder). Unfortunately not all of the data copied successfully, but 90% of it did. I would like to run a set of commands with which I can compare the source and the destination folder and then copy/recopy the files that do not match the files in the source folder.

I'd appreciate a nudge in the right direction.

:)
 
rsync -v /home/user/a /home/user/b


Does this look right for what I'm doing?

Or is it:

rsync -v -r /home/user/a /home/user/b
 
Make sure you understand the difference between rsync -av /home/user/a /home/user/b and rsync -av /home/user/a/ /home/user/b. The first form would create an extra directory /home/user/b/a that you probably don't want.
 
Yea, crap, found that out the hard way @kpa. What is the point of the -a and why not use the the -r switch?
 
Last edited by a moderator:
I've read another explanation that just mentioned that -a was archival flag. It have no other explanation. Thanks for the link!
 
Back
Top