How to Count Number of Files and Subdirectories inside the directory in Linux command line? Core

The simplest way to count number of files & subdirectories in a parent directory using a “tree” command.

$ tree -iLf 1

Linux command line

$ tree -iLf 1 /var/log

simplest way to count number of files & subdirectories

You can use the tree man page for more useful options, configuration files and environment variables to use.

At Velan, our server support engineers can help you with install Linux OS and help to identify the files & folder counts on your server. If you are interested in our service, please fill the Quick connect form to get in touch with us.

Credentials

Quick Connect With Us


    captcha
    reload