How to count file number in a directory under Linux ?

One of the possibilities is to use this command line:

ls -1 your/directory/ | grep -c ""

(your/directory/ is to replace by the directory you want to count its files)

Discussion

François ParmentierFrançois Parmentier, 2009/03/24 11:43

ls -l your/directory/ | wc -l

works too.

Enter your comment
 
 
 

Recent changes RSS feed Valid XHTML 1.0 Valid CSS Driven by DokuWiki