2

現在、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
4

1 に答える 1

3
test file1 -ot file2 && cp file2 file1
于 2013-10-11T09:39:35.257 に答える