counting number of files
Is there a command in Linux counting the number of files in a directory and all its subdirectories?
|
ls -R | wc -l
|
Quote:
|
maybe
Code:
find . -type f | wc -l that doesnt count symbolic links though |
None I know of in standard installations ... but you
can probaly write something in C. Cheers, Tink |
Counting number of files
Here is a small script to count the number of files directories and sym links in a directory.
---------------- let COUNT=0 for i in $1/* do let COUNT+=1 done echo $COUNT ---------------- example command: count ./ with a few more modifications to the script it could count all files in sub directories also. Enjoy! |
Re: Counting number of files
Quote:
Code:
ls -R | wc -l Cheers, Tink |
All times are GMT -5. The time now is 02:03 PM. |