Hi all, I was wondering if anyone could help me figure out a way to efficiently solve a problem.
I've just preformed a large data migration from my old system to a new dedicated NAS. In doing this, I created one large (nearly 1TB) compressed file of the root share.
As you can imagine, after collecting nearly 1TB of data, the structure has gone wacky from multiple users. I'd like to clean this up a bit.
tldr:
What is the most efficient way via bash to move all file types to their own folders?
EG.
-All data exists under /myextracteddata
-Run script recursively on myextracteddata finding all filetypes
-End up with a final structure similar to this
/newDataStructure/png
/newDataStructure/jpg
/newDataStructure/pdf
I've found a few solutions out there that I could easily modify but for the sake of doing it right I'd like to use this as an exercise to learn the best way via bash.
Also know that I know I said multiple users. In this situation it's not necessary to retain any hierarchy showing ownership of the files within the new location.
tyia!
I've just preformed a large data migration from my old system to a new dedicated NAS. In doing this, I created one large (nearly 1TB) compressed file of the root share.
As you can imagine, after collecting nearly 1TB of data, the structure has gone wacky from multiple users. I'd like to clean this up a bit.
tldr:
What is the most efficient way via bash to move all file types to their own folders?
EG.
-All data exists under /myextracteddata
-Run script recursively on myextracteddata finding all filetypes
-End up with a final structure similar to this
/newDataStructure/png
/newDataStructure/jpg
/newDataStructure/pdf
I've found a few solutions out there that I could easily modify but for the sake of doing it right I'd like to use this as an exercise to learn the best way via bash.
Also know that I know I said multiple users. In this situation it's not necessary to retain any hierarchy showing ownership of the files within the new location.
tyia!