Linux file folder statistics command

1. count the number of files in the current folder

ls -l |grep "^-"|wc -l

2. count the number of the current folder directory:

ls -l |grep "^d"|wc -l

3. statistics under the current folder number of files, including subfolders of:

ls -lR|grep "^-"|wc -l

4. Statistical folder number directory, including subfolders of:

ls -lR|grep "^d"|wc -l

5. Display folder files (might be directories, links, equipment, files, etc.) information

ls -l 

7. The number of rows in the statistics file contents

 wc -l  

Guess you like

Origin www.cnblogs.com/Eng1ne-ty/p/12033565.html
Recommended