Command to compare drives and copy missing files
Hi! I migrated my OS and home directory (on separate partitions) to a new laptop with a new HD. Copying my home folder was MOSTLY successful. After discovering some missing directories I had to hook up my old drive via a USB adapter and manually compare my original /home folder with my new one to find any obvious missing files, but I just can't go through all the subdirectories with a fine-tooth comb to look for more, since it's over 100GB and has years of files.
So -- I need a command to compare my old drive (my old /home folder) with my new one, and automatically copy any missing files into the correct subdirectories in my new drive. Using drag-and-copy through the usual file managers just doesn't seem to cut it, as I can't seem to tell it to "skip" overwriting existing files and then remember the answer -- it keeps asking me EVERY time for EACH file -- !!!! Thanks for your help! (Lubuntu 12.04 on a Lenovo S205) |
rsync is what you want. (apt-get install rsync)
Code:
rsync -av /src/ /dst/ |
|
All times are GMT -5. The time now is 08:15 AM. |