Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

df: add support for --total option #3197

Merged
merged 3 commits into from
Mar 5, 2022
Merged

Conversation

jfinkels
Copy link
Collaborator

This pull request adds support for the --total option to df, which displays the total of each numeric column. For example,

$ df --total
Filesystem            1K-blocks     Used Available Use% Mounted on
udev                    3858016        0   3858016   0% /dev
...
/dev/loop14               63488    63488         0 100% /snap/core20/1361
total                 258775268 98099712 148220200  40% -

Change the signature of `DisplayRow::new()` to borrow `Row` instead of
consuming it, so that the `Row` can be used after it is displayed.
Add support for the `--total` option to `df`, which displays the total
of each numeric column. For example,

    $ df --total
    Filesystem            1K-blocks     Used Available Use% Mounted on
    udev                    3858016        0   3858016   0% /dev
    ...
    /dev/loop14               63488    63488         0 100% /snap/core20/1361
    total                 258775268 98099712 148220200  40% -
@sylvestre sylvestre merged commit d0ebd1c into uutils:main Mar 5, 2022
@jfinkels jfinkels deleted the df-total branch March 12, 2022 18:37
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.

2 participants