As you know magento store images in pub media folder
I import lots of files (millions), thousands at once and I thought it is a good idea to split those millions files in at least thousands folders
So my namefiles.jpg are barcode
i created a batch in windows to split those files into subdirectories based on the name files
like so
move /Y ?????????0000p.jpg p
move /Y ?????????1000p.jpg p 1
move /Y ?????????2000p.jpg p 2
move /Y ?????????3000p.jpg p 3
move /Y ?????????4000p.jpg p 4
move /Y ?????????5000p.jpg p 5
move /Y ?????????6000p.jpg p 6
move /Y ?????????7000p.jpg p 7
move /Y ?????????8000p.jpg p 8
move /Y ?????????9000p.jpg p 9
move /Y ?????????0100p.jpg p 1
move /Y ?????????1100p.jpg p 11
move /Y ?????????2100p.jpg p 12
...
and so on for all 0000 -> 9999 possibilities
Since number are random the files are more or less splitted equally
In windows I created a .bat with all 10.000rows to move files, then I zip everything, upload and unzip in the main server. Anyone knows a way to do it in linux?