Posted By

alassiter on 03/10/11


Tagged

command unix linux line


Versions (?)

Count files in a directory


 / Published in: Bash
 

A very simple quick way to count the number of files in a directory.

  1. ls -1 | wc -l
  2.  
  3. ## You can also use find to search recursively and count the returned files:
  4.  
  5. find . -name "*.rhtml" | wc -l

Report this snippet  

You need to login to post a comment.