|
From: | Kerin Millar |
Subject: | Re: Sorting directories by size |
Date: | Tue, 24 Aug 2021 15:44:12 +0100 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 |
On 24/08/2021 15:31, Dennis Williamson wrote:
On Tue, Aug 24, 2021, 9:26 AM hancooper <hancooper@protonmail.com <mailto:hancooper@protonmail.com>> wrote:. Have got almost what I'd like, except that tho sizes are not in human readable form. find "$src" "${daggr[@]}" -type d -exec du {} + | sort -rnUse du -h and feed it into the awk or gawk command in the stackoverflow answer I linked in my recent message. And don't feed it any names containing newlines.
Please, let's not. The commands I have been proposing from the outset correctly handle arbitrary pathnames, provided that GNU coreutils is available. They only need to be applied correctly rather than be mangled into something else.
-- Kerin Millar
[Prev in Thread] | Current Thread | [Next in Thread] |