Linux Command - the number of files in the directory View

1. Check the number of files under the current directory

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

2, the number of files that contains subdirectories under the current directory View

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

3, view the current directory number directory

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

4, view the current directory that contains the number of subdirectories under the directory

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

Guess you like

Origin www.cnblogs.com/cailingsunny/p/11972883.html