Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以仅使用 find(1) 命令仅选择 N 个文件?
find /var/lib/inbox \ -type f -WHAT? 10 -execdir mv --target-directory=/var/tmp/scratch/ '{}' +
我阅读了手册页,但找不到任何明显的东西。当然,这可以使用管道和头部轻松解决:
find /var/lib/inbox -type f | head | xargs mv -t /var/tmp/scratch