ls | wc -l #Count files on current directory
ls path/to/dir | wc -l #Count files on specific directory path
du -a | cut -d/ -f2 | sort | uniq -c | sort -nr
a=1
for i in *.jpg; do
new=$(printf "%04d.jpg" "$a") #04 pad to length of 4
mv -i -- "$i" "$new"
let a=a+1
done
find . -type f | sed 's/.*.//' | sort | uniq -c
ls -v | cat -n | while read n f; do mv -n "$f" "$n.ext"; done