Lets say you have this kind of file/folder structure:
master folder ---- folder1 ---- image1.jpg | | | |-- image2.jpg | | |-- folder2 ---- image1.jpg | | | |-- image2.jpg | |-- etc.
You can take all the *.jpg file or any file type, and move it into one single/master folder.
Here are the command to use:
cd <master_directory> <-- master/top folder where all the file are located inside it find * -type f -print0 | xargs -0 -I%%% mv -n %%% ../<new_directory> <-- "new destination folder"