Wednesday, December 21, 2011

Scripts in linux to count the number of dirs or files...


(for dirs):
ls -l | grep ^d | wc -l


(for files):

ls -l | grep ^- | wc -l

0 comments: