I have a folder with lots of images,I want to move all images which filename contains "cover" and size is bigger than 100K to /root/img. Below command can move all the files that filename contains "cover" but without size condition.My questions is how to combine with condition that image's size is bigger than 100K.thank you!
find . -name '*cover*' -exec mv '{}' /root/img \;
Run Code Online (Sandbox Code Playgroud)
find . -name '*cover*' -size +100k -exec mv '{}' /root/img \;
Run Code Online (Sandbox Code Playgroud)
此命令将移动包含名称“cover”且大于 100K 的任何文件。
| 归档时间: |
|
| 查看次数: |
7850 次 |
| 最近记录: |