Linux and Unix view the number of files and directories
Check the number of files and directories under Linux and UNIX
1. Check the number of files in the directory
Ls-l View Directory | grep "^ -" | wc-l
2. Check the number of files in the directory, including the files in the subdirectory
Ls-lR View Directory | grep "^ -" | wc-l
3. Check the number of directories in the directory, including the directories in the subdirectory
Ls-lR View Directory | grep "^ d" | wc-l