Consider a directory with N files.
I can list the files alphabetically sorted and store the list by
ls > list
Then I want to create n sub-directories in same directory, which can be done by
Now I want to move the first m or say first 5 (1-5) files from
direc1, the next 5 file i.e. 6-10 to
direc2 and so on.
This may be a trivial task for you guys, but am not able to do it at the moment. Please help.