Linux Command - the number of files in the directory View
Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/sand_clock/article/details/80908733
View the number of files under the current directory
ls -l | Grip "^ - '| wc -l
View the current number of files in the directory (file contains subdirectories)
ls -lH | Grip "^ - '| wc -l
View the number of current directory directory
ls -l | Grip "^ d" | wc -l
View the current number of directory directory (the directory that contains subdirectories)
ls -lH | Grip "^ d" | wc -l