Reputation: 15250
I need to move thousands of images:
/Directory/0000/000000.jpg
/Directory/..../.......jpg
/Directory/ZZZZ/ZZZZZZ.jpg
to a flat directory:
/Directory/000000.jpg
/Directory/.......jpg
/Directory/ZZZZZZ.jpg
How can I do this?
Essentially I'm looking for something like this: (but, you know, actually works)
mv -r /Directory/*/*.jpg /Directory
Upvotes: 2
Views: 1546
Reputation: 5737
What about:
find /Directory -name \*.jpg -exec mv {} /Directory \;
That should work.
Upvotes: 11