How do I copy a file in Linux only when the file being copied is newer than the version at the destination?
If the file at the destination is newer, I want the file copy to not go ahead.
Using the update option (-u) with cp should do it for you.
http://beginnerlinuxtutorial.com/help-tutorial/basic-linux-commands/cp-linux-copy-command/
You're not saying what shell you're using, so I'm going to assume ksh:
if [[ file1 -nt file2 ]]; then cp file1 file2; fi
yes|cp -ruv /from/* /to/.
yes - Answer yes to all the questions.
r - Recursive
u - update
v - Progress
works like xargs.
I don't know how to explain academically.