Re: Possible enhancement: file count

2016-03-02 Thread Stephane Chazelas
2016-02-29 16:59:47 +0100, Ruediger Meier: [...] > What about "du --inodes"? coreutils >= 8.22 [...] Note that it counts the "inodes" which is different from "directory entries". For instance, in a directory that contains 100 entries all hardlinks do the same file, du --inodes will report 2

Re: Possible enhancement: file count

2016-03-01 Thread Stephane Chazelas
2016-02-29 08:48:16 -0700, Eric Blake: > On 02/29/2016 08:23 AM, Fernando Pereira wrote: > > > Anyway, I was looking for the most efficient way to do that and I couldn't > > find satisfying answer. Of course we can use find | wc, but I am really > > looking for a simple and efficient solution

Re: Possible enhancement: file count

2016-02-29 Thread Bernhard Voelker
On 02/29/2016 04:59 PM, Ruediger Meier wrote: > What about "du --inodes"? coreutils >= 8.22 ... and especially the combination with -t, --threshold (since 8.21). >From the Texinfo manual: (http://www.gnu.org/software/coreutils/du) Here's how you would use `--threshold' to find directories

Re: Possible enhancement: file count

2016-02-29 Thread Fernando Pereira
Thanks for the very informative answer! I expected the piping of all the filenames to another program to incur much higher overhead. Anyway I'm glad to see that the new du can count inodes, hopefully faster for when we can give up flexibility. Cheers, Fernando On 29 February 2016 at 17:28, Assaf

Re: Possible enhancement: file count

2016-02-29 Thread Assaf Gordon
Hello Fernando, On 02/29/2016 10:48 AM, Eric Blake wrote: On 02/29/2016 08:23 AM, Fernando Pereira wrote: Anyway, I was looking for the most efficient way to do that and I couldn't find satisfying answer. But 'find | wc' IS efficient, and already exists on every machine, Additionally,

Re: Possible enhancement: file count

2016-02-29 Thread Fernando Pereira
Hi, I think that might just be what I had in mind. Unfortunately it is still not available in my RHEL6. But thanks a lot for pointing that out. Just for reference, du space count seems faster than find | wc. Looking forward to test with du --inodes. [root@-]# time du -sh 108G. real

Re: Possible enhancement: file count

2016-02-29 Thread Ruediger Meier
On Monday 29 February 2016, Fernando Pereira wrote: > Hello everybody, > > First post here, so sorry if I lack knowledge on the details... > I'm doing system admin in a company and user directories here get > pretty big sometimes. Not only they reach 100GB easily but they are > produce millions of

Re: Possible enhancement: file count

2016-02-29 Thread Eric Blake
On 02/29/2016 08:23 AM, Fernando Pereira wrote: > Anyway, I was looking for the most efficient way to do that and I couldn't > find satisfying answer. Of course we can use find | wc, but I am really > looking for a simple and efficient solution just like du exists for the > file size. But 'find

Possible enhancement: file count

2016-02-29 Thread Fernando Pereira
Hello everybody, First post here, so sorry if I lack knowledge on the details... I'm doing system admin in a company and user directories here get pretty big sometimes. Not only they reach 100GB easily but they are produce millions of small files due to their work nature. So, a very "simple" old