Linux:如何将一定长度的文件复制到我的主目录

0 linux file-copy

我正在尝试将一定长度的文件复制到我的主目录。有没有一个命令可以做到这一点?

ica*_*rus 5

当您标记问题 linux 时,我们可能假设您拥有 gnucp程序。

find . -size 300c -type f -exec cp -t "$HOME" {} +
Run Code Online (Sandbox Code Playgroud)

将所有 300 字节长的文件复制到当前目录下的 $HOME 目录中。

find . -size +200c -size -500c -type f -exec cp -t "$HOME" {} +
Run Code Online (Sandbox Code Playgroud)

将复制长度超过 200 且小于 500 字节的文件。