Skip to content

Conversation

@jfinkels
Copy link
Collaborator

Change df so that it correctly scales numbers of bytes by the
default block size, 1024, when neither -h nor -H are specified on the
command-line. Previously, it was not scaling the number of bytes in
this case.

Now GNU df produces:

$ df | sort | head -n1
/dev/loop0                    56832    56832         0 100% /snap/core18/2253

and uutils df produces:

$ ./target/debug/df | sort | head -n1
/dev/loop0              56832        56832            0  100% /snap/core18/2253

(The spacing is wrong, but the numbers are right. This pull request is not about the spacing.)

Fixes #3058.

Change `df` so that it correctly scales numbers of bytes by the
default block size, 1024, when neither -h nor -H are specified on the
command-line. Previously, it was not scaling the number of bytes in
this case.

Fixes uutils#3058.
@sylvestre sylvestre merged commit 6224a08 into uutils:main Feb 23, 2022
@tertsdiepraam
Copy link
Member

@jfinkels There were some doc warnings in the CI, could you fix those in another PR?

@jfinkels
Copy link
Collaborator Author

jfinkels commented Feb 24, 2022 via email

@jfinkels jfinkels deleted the df-scale-by-block-size branch February 24, 2022 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

df: displayed sizes are in the wrong units

3 participants