On Mon, 14 Mar 2016 21:03, jdd wrote:
Le 14/03/2016 20:05, Felix Miata a écrit :
Carlos E. R. composed on 2016-03-14 19:43 (UTC+0100):
What, you do not like that lot of lines in df output? Well, that's df fault. It does not distinguish bind mounts either. We'd need new options to tell df to ignore certain stuff (like tmpfs).
I changed .bashrc 1.5 years ago: alias df='df --exclude-type=tmpfs --exclude-type=devtmpfs --exclude-type=cgroup '
Is freespace on *mpfs or cgroup ever relevant to a human? The new df option should be for inclusion, not exclusion, making excluding them the default.
is there a way to exclude btrfs subvolumes?
TL;DR: for btrfs keep the one with the shortest mountpoint path, per device. Roundabout: scripted, grep the devices you want and/or exclude from /proc/mounts, for devices that come up multiple times, exclude the bind mounts, for btrfs, keep only the one with the shortest mount point path. It's possible to do that with a awk one-liner. Feed that into df, make a alias / function or shell script for that. Sorry, away from machine with btrfs sub-vols, so no example. - Yamaban.