My files have the following structure:
11
--11a
-----a.jpg
-----b.jpg
-----....
--11b
-----d.jpg
-----g.jpg
...
I want to have all the .jpg files in one folder:
11
-a.jpg
-b.jpg
-d.jpg
-g.jpg
...
Basically I have subfolders with many .jpg files and I want to move all of them to one directory (e.g. parent).
I have tried:
mv */*.jpg all
but I get -bash: /bin/mv: Argument list too long
.
Some posts suggest xargs and some other the find solution but unfortunately nothing seems to be working for me.
find
will give you a solution, but you need to answer these questions before I can suggest a solution.