Sort files in folders alphabetically
for i in *; do I=`echo $i|cut -c 1|tr a-z A-Z`; if [ ! -d "$I" ]; then mkdir "$I"; fi; mv "$i" "$I"/"$i"; done
Creates one letter folders in the current directory and moves files with corresponding initial in the folder.