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

Re: lokking for portable way to determine the size of harddisks



Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de> writes:

> The -k guarantees that the block size is 1024. Without the -k
> it should print out 512 byte blocks, but the current df we have
> is incompliant wrt this (note to self: file a bug report).

That's Not A Bug, That's A Feature :)

You should set the POSIXLY_CORRECT environment variable, if you
want GNU tools to be (more) POSIX compliant:

<0>forcer@forcix[2]:~$ df /tmp/
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/hda3              3937068   1441908   2295152  39% /
<0>forcer@forcix[2]:~$ POSIXLY_CORRECT=1 df /tmp/
Filesystem          512-blocks      Used Available Use% Mounted on
/dev/hda3              7874136   2883816   4590304  39% /

Greetings,
        -- jorgen

-- 
Jorgen Schaefer
Debian GNU/Linux Developer
forcer@debian.org



Reply to: