Last active
December 30, 2017 16:49
-
-
Save nicewook/c25ef286ccf041c651afa02420288c01 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
c=0; d=0; mkdir -p data${d} | |
for file in ./test/* | |
do | |
if [ $c -eq 10000 ] | |
then | |
d=$(( d + 1 )); c=0; mkdir -p data${d} | |
fi | |
mv "$file" data${d}/ | |
c=$(( c + 1 )) | |
done |
Author
nicewook
commented
Dec 30, 2017
- test 폴더의 많은 파일을 10000개 단위로
- data0 부터 하나씩 늘리며 폴더를 만들어 넣는다
실행시는
- chmod 755 divide_files.sh
- ./divide_files.sh
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment