Knowledgebase

Determine number of files in any given directory(folder)

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?

  • 400 Users Found This Useful
Was this answer helpful?

Related Articles

Characters like Â, ’ are showing up on my web site page

This problem is generally related to the wrong text encoding that is being supplied to your...

How does one run a PHP script as a CGI?

#!/usr/bin/php -q< ?//php source here?>The PHP script needs to be given permission (chmod)...

Are Server Side Includes allowed?

Server Side Includes (SSI) are allowed on KARTHOST.com servers. However you must modifiy your...

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

  If you are planning on loading large amount of files into a single directory, you might...