Skip to content

df: incorrect whitespace between columns in output table #3194

@jfinkels

Description

@jfinkels

This whitespace between columns in the table produced by df does not match that of GNU df.

GNU df:

$ df | head -n4
Filesystem                1K-blocks     Used Available Use% Mounted on
udev                        3858016        0   3858016   0% /dev
tmpfs                        782624     2112    780512   1% /run
/dev/mapper/vgubuntu-root 242791844 94907344 135481608  42% /

uutils df:

$ ./target/debug/df | head -n4
Filesystem          1k-blocks         Used    Available  Use% Mounted on       
udev                  3858016            0      3858016    0% /dev            
tmpfs                  782624         2112       780512    0% /run            
/dev/mapper/vgubuntu-root    242791844     94907356    147884488   39% /  

It appears that the column width depends on the length of the largest entry in the column.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions