Pipe ls to wc to get file count in your directory

Submitted by jeff on Tue, 05/27/2008 - 17:30.

ls does not give you a file count. To get a file count you can pipe ls into the wc command. I guess wc means “word count”.

ls | wc -l