View Single Post
  #1   IP: 153.99.39.21
Old 2015-08-18, 03:41 PM
Sabin Sabin is offline
初级会员
 
Join Date: 2007-11-23
Posts: 1
Sabin 现在声名狼藉
Default

find . -type f | wc -l

Explanation:
find . -type f finds all files ( -type f ) in this ( . ) directory and in all sub directories, the filenames are then printed to standard out one per line.

This is then piped | into wc (word count) the -l option tells wc to only count lines of its input.

Together they count all your files.
Reply With Quote