I have, today, had to use dd_rescue and Photorec to retrieve data from a corrupted drive.
The files that I have retrieved are now in 111 folders (approx 60,000 files of various formats) within 1 master folder, e.g:
What I would like to do is issue a command at the cli that will descend into each sub-folder and move (not
copy) every file from the sub-folder into the master_folder until the contents of all 111 sub-folders have been relocated to the master_folder.
I know this would be easy enough with cp
but I am dealing with a large amount of data and do not have the space to duplicate it using copy prior to deleting the original sub-folders and their contents hence why I want to use the mv
Once I have moved everything into a flat structure I would then intend to create a folder for each file type and then move all files of a given type into the corresponding folder, e.g:
Any help would be very appreciated.
Thanks for reading.