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.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
Using the update option (-u) with cp should do it for you.
rsync --progress -r -u /from/one/* /to/another/directory
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.