我目前正在使用 BusyBox v1.16.2 并且cp命令不提供更新选项:
...
-u, --update
copy only when the SOURCE file is newer than the destination file
or when the destination file is missing
有没有其他选择?
我会考虑使用 find --newer 参数,但我试图弄清楚如何去做(经过几次尝试......)。
BusyBox v1.16.2 multi-call binary.
Usage: cp [OPTIONS] SOURCE DEST
Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY
Options:
-a Same as -dpR
-R,-r Recurse
-d,-P Preserve symlinks (default if -R)
-L Follow all symlinks
-H Follow symlinks on command line
-p Preserve file attributes if possible
-f Force overwrite
-i Prompt before overwrite
-l,-s Create (sym)links