Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Finding total number of files and/or folders on Linux box

Posted on 2005-04-07
2
Medium Priority
?
319 Views
Last Modified: 2010-04-20
Is there a command that can be run from the command line that gives me the total number of files on my Linux machine.  The machine is running Linux Redhat AS 2.1.  Thanks.

0
Comment
Question by:dave_mcdowell
2 Comments
 
LVL 8

Accepted Solution

by:
marxy earned 200 total points
ID: 13728247
find / | wc -l

But this operation has much cost of time.
Or if you use updatedb

locate / | wc -l

All these command will return number of file on the all mounts.
You can modify their path to calculate something different then 'root' (/)
0
 

Author Comment

by:dave_mcdowell
ID: 13728625
Worked perfectly.  Thanks.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension . This reminded me of questions that come up here at EE along the lines of, "How can I tell the type of file from its cont…
Often times it's very very easy to extend a volume on a Linux instance in AWS, but impossible to shrink it. I wanted to contribute to the experts-exchange community a way of providing a procedure that works on an AWS instance. It can also be used on…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month11 days, 12 hours left to enroll

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question