[FIX] How to split the content of a folder into subfolders
I would like to know if there is an easy way to automatically (programmatically, within a bash script) to split the content of a folder into subfolders with the parent folder.
I have a folder let’s say with 580 files (of the same suffix), which I would like to split into six subfolders named e.g.
subfolder2, etc. and put in each 100 files except the last which will contain the rest), or split evenly, if easier).