[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Feature Request: du command - add option to report only on file obje
From: |
Scott L Fields |
Subject: |
Re: Feature Request: du command - add option to report only on file objects owned by user/group |
Date: |
Thu, 13 Apr 2017 09:12:36 -0500 |
Primarily because you're doing a file name comparison for every entry
reported entry from "find", versus just checking the UID/GID.
When you're involving a list of several thousand files, that is a
significant increase of resource usage (memory and CPU).
Thanks
From: Eric Blake <address@hidden>
To: Scott L Fields/Fort Worth/IBM@IBMUS, address@hidden
Date: 04/13/2017 08:05 AM
Subject: Re: Feature Request: du command - add option to report
only on file objects owned by user/group
On 04/13/2017 07:54 AM, Scott L Fields wrote:
> I'm looking for a convenient way to see the total space a given user
> and/or group is using in a directory path.
>
> Currently, this can be achieved by options like "find <fsname> -user
> <user> -print0 | du --from0-files=1", but is not all that efficient for
> very large listings.
Why not? It's exactly two processes running, and nicely combines the
existing behavior of two tools each doing one thing well (find doing the
filtering, du doing the summing on the list).
>
> I would like to request an option in "du" to allow only file objects
owned
> by a specific user and/or group be shown.
I don't see how this would be any more efficient than the find|du
invocation you are already using.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[attachment "signature.asc" deleted by Scott L Fields/Fort Worth/IBM]