Determining the number of files in a directory

White Hat pigskin_referee at
Sat Nov 3 05:28:21 PDT 2007

This is probably a dumb question; however, I never let a little thing like that bother me in the past.
Using FreeBSD-6.2 and Bash, how do I determine the number of files in a given directory? I have tried all sorts of combinations using different flags with the 'ls' command; however, none of them displays the number of files in the directory.
Other than, by writing a script to accomplish this feat, how could I achieve my goal?
White Hat 
pigskin_referee at

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the freebsd-questions mailing list