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

I have a folder with a range of numbered files (camera images) and I'd like to move every other image into a different folder, so either all the odd numbered images, or all the even ones. How can I do this using unix commands?

  IMG_0001.CR2 [move this]
  IMG_0003.CR2 [move this]
  IMG_0005.CR2 [move this]
share|improve this question

1 Answer 1

up vote 5 down vote accepted

Try this:

mkdir odd; mv *[13579].CR2 odd
share|improve this answer
Perfect, thank you @duDE ! – Jamie Apr 25 '13 at 10:18

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.