Sunday 19 July 2009

count num files large in number

let us say,If we want to count number of files in a directory where there are some 40,000 plus files.. ls * | wc -l wont work here.

ls * | wc -l says..
bash: /bin/ls: Argument list too long

To do this use our find..

find . -type f | wc -l

41080

No comments:

Post a Comment

Tweets by @sriramperumalla