The GNU/Linux version of cp has a nice --update flag:
-u, --update copy only when the SOURCE file is newer than the destination file or when the destination file is missing
The Mac OS X version of cp lacks this flag.
What is the best way to get the behavior of cp --update by using built-in system command line programs? I want to avoid installing any extra tools (including the GNU version of cp).
From stackoverflow
-
rsynchas an-u/--updateoption that works just like GNUcp:$ rsync -u src dest
0 comments:
Post a Comment