Get the App
SLTechnology News&Howtos  ›  Servers  › 

Linux and Unix view the number of files and directories

Shulou Source: shulou.com Published: 2022-06-03 04:08:23 11月15日 Update

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

Tags: Directory number file subdirectory subdirectory Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Huawei Shulou Tech Info Apple Shulou Technology