|
From: | Pádraig Brady |
Subject: | Re: Feature Request: 'du' command allow filter by user name |
Date: | Mon, 9 Jan 2023 19:46:37 +0000 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Thunderbird/109.0 |
On 09/01/2023 18:45, SCOTT FIELDS wrote:
-----Original Message-----From: Pádraig Brady <P@draigBradin.com> Sent: Monday, January 9, 2023 12:39 PM To: SCOTT FIELDS <Scott.Fields@kyndryl.com>; coreutils@gnu.org Subject: [EXTERNAL] Re: Feature Request: 'du' command allow filter by user name On 09/01/2023 16:12, SCOTT FIELDS wrote:Though not incredibly difficult to script, it would be useful to have 'du' allow a filter by 'user'. AKA, 'du -user <user> <path>' to show only the files and usage for the specified user.du isn't special in its filtering requirements here, and we can pipe robustly from the standard file filter like: find -type f -user $USER -print0 | du --files0-from=- So I don't think this would be appropriate to add to du.
> > The problem is that doesn't provide you a summary, since it gives you usage for each file. > > And sorry, I didn't include that as a use case, including '-s' option. Fair enough. Though that use case is unusual. I.e. directories with multiple users. Even then, since the invocation is per user, you can use the `--total | tail -n1` option to get a single usage for the user, albeit not summarized per specified directory. cheers, Pádraig.
[Prev in Thread] | Current Thread | [Next in Thread] |