[Top][All Lists]

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

Re: df: --inodes versus --portability mode

From: Bernhard Voelker
Subject: Re: df: --inodes versus --portability mode
Date: Tue, 18 Sep 2012 12:54:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120825 Thunderbird/15.0

On 09/18/2012 12:04 PM, Pádraig Brady wrote:
> On 09/18/2012 10:47 AM, Bernhard Voelker wrote:
>> For the implementation of the new --output option, and the cleanup
>> necessarily coming with it, I'd like to fix that so that a -P will
>> override a previous -i and vice versa:
>>    $ src/df -iP | head -n 2
>>    src/df: warning: option '-P' is overriding the previous mode
>>    Filesystem     1024-blocks      Used Available Capacity Mounted on
>>    rootfs            12095032   7515424   3965208      66% /
>>    $ src/df -Pi | head -n 2
>>    src/df: warning: option '-i' is overriding the previous mode
>>    Filesystem       Inodes   IUsed    IFree IUse% Mounted on
>>    rootfs           768544  237523   531021   31% /
>> WDYT?
> I don't like order being significant.

Good point.

> du -i is an extension to POSIX, so I think it's fine for -i to override.

s/du/df/ i guess ;-)

> -P essentially meant don't wrap but that's moot now,

That was actually my question: -P means "default mode" in
the first place, i.e. one could read it as "print block size".
And now comes -i ...

> but I'd keep it as is for backwards compat.

... another good point - and I think I should stick with it.
So as -P does nothing, shouldn't df print a warning that
it disregards it when -i is in effect?

I thought that I could get rid of the mashing up of the scale
factor (human_output_opts, output_block_size) and df's main
somehow ... because the same question will arise again with
'df -P --out=...' ;-/
IMHO the cleanest solution would be to make the main modes
-i, -p and the new --o mutually exclusive.

Have a nice day,

reply via email to

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