[Top][All Lists]

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

Re: [PATCH] Support for --size in du

From: Pádraig Brady
Subject: Re: [PATCH] Support for --size in du
Date: Thu, 17 Jan 2013 14:58:19 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

On 01/17/2013 02:46 PM, Likai Liu wrote:
Regarding the block size versus apparent size, like Padraig, I think it's okay 
to let --size just filter the size, whichever the user happens to choose right 
now. One can combine it with apparent size.

I think having special character in --size to denote max and min sizes are 
confusing. Why not have separate --max-size and --min-size arguments? This way 
you can filter by a range, and it's obvious what the flags mean. It's also more 
consistent in style with the --max-depth flag.

If you absolutely want just one arg, what about --size=[minsize]-[maxsize]? 
e.g. --size=4K- filters output to entries greater than 4K, --size=-8K filters 
output to those lesser than 8K, and --size=4K-8K filters output for those 
between 4K and 8K.

I Just noticed another option from BSD:

-t threshold
     Display only entries for which size exceeds threshold.  If
     threshold is negative, display only entries for which size is
     less than the absolute value of threshold.

I slightly prefer --min-size and --max-size,
though not at the expense of losing the opportunity
to increase compat between these tools.

I suppose we could rename --size to --threshold too.


reply via email to

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