I once had a request to sum the number of files in a specific folder.After googling I found the command wc could help me out.
wc – print newline, word, and byte counts for each file. And I think wc is short for Word Count.Please have a detailed information by visiting http://linux.about.com/library/cmd/blcmdl1_wc.htm if you have the desire.
Ok,Let’ get the total number of files(including folders) in a specific folder
1
|
|
Well,the following command will sum the number of pure files(Not including folders)
1
|
|
However how to sum the number of pure folder?The following command will help.
1
|
|