Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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  \;
share|improve this question
up vote 6 down vote accepted
find . -name '*cover*' -size +100k -exec mv '{}' /root/img \;

This command will move any file that contains the name "cover" and is greater than 100K.

share|improve this answer
what does {} mean? – Lanston Jul 25 '13 at 23:40

You want the -size predicate.

share|improve this answer
how to combine with -name? could you show me full command? thanks – user167043 May 4 '12 at 4:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.