Answers for "how to count files in a folder"

1

How to count number of files in each directory

du -a | cut -d/ -f2 | sort | uniq -c | sort -nr
Posted by: Guest on June-11-2020
0

number all files in a folder

ls -v | cat -n | while read n f; do mv -n "$f" "$n.ext"; done
Posted by: Guest on June-17-2020

Code answers related to "how to count files in a folder"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language