coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Possible enhancement: file count


From: Fernando Pereira
Subject: Re: Possible enhancement: file count
Date: Mon, 29 Feb 2016 17:25:31 +0100

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    2m29.323s
user    0m1.001s
sys     0m9.887s

[root@-----]# time find . -type f | wc -l
808572
real    2m57.802s
user    0m2.250s
sys     0m12.365s

Cheers

On 29 February 2016 at 16:59, Ruediger Meier <address@hidden> wrote:

> 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 small files due to their work nature.
> > So, a very "simple" old task is to check the users space consumption
> > and, btw, check if they don't have a hot directory with many many
> > small files, which then should be archived.
> >
> > 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.
> > IMHO, obtaining the file count in a given directory seems a kind of
> > "disk usage", and the same way that with df one can see inodes, why
> > not having a file count option to du?
> >
> > I would like to know if this is against the concept of du. Otherwise
> > I think it would help many people out there, and I might be able to
> > contribute to its implementation.
>
> What about "du --inodes"?  coreutils >= 8.22
>
> cu,
> Rudi
>
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]