Created
April 10, 2018 17:50
-
-
Save reinislejnieks/6c188cea875c737ef66d9a6e851a9581 to your computer and use it in GitHub Desktop.
#macos split files in folders
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i=0; | |
for f in *; | |
do | |
d=dir_$(printf %03d $((i/100+1))); | |
mkdir -p $d; | |
mv "$f" $d; | |
let i++; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment