Skip to main content

Counting files in a directory

I would have thought ls would have an option for this, but the necessary command is:

ls -l | wc -l

http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x700.html

Comments