I usually backup my work to an external hard drive. Since this is a weekly task, I want to be able to copy only the files which had changed in the past week rather than copying all the files all over again. The file explorers in Ubuntu/Linix Mint are very stable but the GUI does not have an option to meet this requirement of mine.
Thanks to the CP command I am able to get this done. Here is the command that I use.
cp -r -u -p /home/pradeep/HarddriveBackup/ "/media/pradeep/My Passport/"
The parameters used with the CP command mean the following.
-r copy directories recursively
-u copy the source file only if the destination file is missing or if it is newer than the destination file
-p preserve the timestamps, ownership of files.
The only drawback of CP is that it does not print the status of file copy when it is copying the files to the destination. Commands like pv and rsync have this option. Since I don’t want to monitor it when the files are being copied, file copy progress does not matter much.