Determine number of files in any given directory(folder) Print

  • 415

You must be logged on as SSH via line command (a good SSH line command utility is PuTTY, www.putty.org) and in the directory in which you wish to determine total number of files.

At the prompt use this command:

ls | wc -l

Notice there is one space between the "s" and the "|" and one space between the "|" and the "w" and one space between the "c" and "-".

The result after running the command will be a number respresenting the total number of files in the directory.

Suggested reading Is there a limit on the number of files a directory (folder) can have?


Was this answer helpful?

« Back