nsbin/old/backup-smaller-dirs

18 lines
198 B
Text
Raw Normal View History

2006-07-20 07:54:37 +00:00
i=0
dir=0
max_files_per_dir=100
mkdir -p $dir
for a in $@; do
if [ $i = $max_files_per_dir ]; then
((dir+=1))
mkdir -p $dir
i=0
fi
mv -i "$a" $dir
((i+=1))
done