bug-coreutils
[Top][All Lists]
Advanced

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

bug#37702: Suggestion for 'df' utility


From: Pádraig Brady
Subject: bug#37702: Suggestion for 'df' utility
Date: Sun, 13 Oct 2019 10:41:57 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:70.0) Gecko/20100101 Thunderbird/70.0

On 11/10/2019 20:56, Paul Eggert wrote:
On 10/11/19 11:20 AM, Pádraig Brady wrote:

if you want to exclude nested file systems like that,
you could try:

    alias df='df -x squashfs'

On my Fedora 30 workstation that option doesn't make any difference.
Regardless of whether '-x squashfs' is used, I see this output from 'df':

Filesystem      1K-blocks      Used  Available Use% Mounted on
devtmpfs          4065704         0    4065704   0% /dev
tmpfs             4081560     36616    4044944   1% /dev/shm
tmpfs             4081560      1696    4079864   1% /run
tmpfs             4081560         0    4081560   0% /sys/fs/cgroup
/dev/sda5        59614116  16910684   39645412  30% /
tmpfs             4081560       124    4081436   1% /tmp
/dev/sda2      1849433716 207781976 1547682948  12% /home
/dev/sda1         5095040    244468    4572044   6% /boot
tmpfs              816312        60     816252   1% /run/user/1000

and most of these lines are useless.

For many years we've put up with the problem of too many filesystems in
the default plain 'df' output, and now's as good a time as any to fix
that. On my workstation there should be only four lines of information,
one each for /, /home, /boot, and the shared tmpfs area.

Presumably readonly filesystems should also be omitted by default, since
they're not something people ordinarily care about.

We can add a flag or two for the rare people who want to see these
normally-useless lines.

What df tries to show now is a deduplicated list of file systems
that have consumable storage. Maybe read-only could be valid to drop
by default, but I've worked on systems where certain file-systems
were read-only most of the time, but they were consumable.
I wonder could we key (also) on used==0||available==0.

cheers,
Pádraig





reply via email to

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