Answer the question
In order to leave comments, you need to log in
Linux how to implement searching and moving files to automatic directory structure?
The bottom line is, there are more than 8 million files and folders.... but the problem is that they are collected in one folder and the structure is simple:
../img/
../img/1/file1.jpg
../img/2/file1.jpg
...
../img/12345/file1.doc
../img/12345/file1.jpg
../img/1234567/filerandomname1.jpg
../img/1234567/newfile18.xls
../img/1/2/3/4/5/6/7/filerandomname1.jpg
Answer the question
In order to leave comments, you need to log in
And what will the new catalogs be called, is it not important at all? Then why bind to old names, it's easier to generate new ones like 1,2,3, etc.
PS And the new structure will not lead to "impossibility to work normally", due to the fact that the files cannot be found?
Try migrating to S3 compatible services. If you want to manage your hosting resources, then take MinIO.
Using the mc (minio-client) utility, you can copy the entire directory structure as is to your cloud service or to any S3-compatible services.
Connect a caching server and then the load on the storage will subside.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question