Roy Schestowitz <newsgroups@xxxxxxxxxxxxxxx> writes:
>__/ [ Rita ] on Tuesday 14 March 2006 19:46 \__
>> Hi ,
>> Is there any command in linux to know how many files are in directory?
>alias nfiles='find . -type f | wc -l'
That will of course recurse down the whole directory tree. Eg it tells how
many files in the directory, and all of the subdirectories.
If you just want the number of entries in the current directory ls|wc
If you just want just the files the immediate directory
find /name/of/directory -maxdepth 1 -type f |wc
>I asked a similar question before:
>See thread for more possibilities.