*Quickly* counting the number of files on a partition

Ian Zimmerman nobrowser-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Fri Jan 20 00:30:07 UTC 2006


Ian> 1/ what you mean by "file".  Most Unix filesystems can link
Ian> multiple names to a single entity known as inode.

Madison> Files, directories and symlinks. Hard links and special
Madison> files/devices I can ignore.

Well, that's just the point - _everything_ is a hard link.  What you're
thinking of as "hard link" is really the 2nd hard link to the inode,
while the "normal" file is the 1st hard link.

But hard linking is probably rare enough these days that you can just
accept the slight overcount.

Madison> works absolutely beautifully on 'ext*' file systems (at
Madison> least). However, it doesn't work on an SMB mounted partitions
Madison> (and others?) though...

Although I don't use them, I am pretty sure it will work on JFS and XFS
too.  SMB is the exception because it is an import from the evil empire.
If there is a way, it's going to be M$pecific.

-- 
A true pessimist won't be discouraged by a little success.
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list