4 ms·
Launch times and (silly, but it really bugged me) pollution of my `df` output drove me away.
by karatestomp 6y ago
Launch times and (silly, but it really bugged me) pollution of my `df` output drove me away.
- ahartmetz 6y agoCluttering up df and mount output is a real problem. They are useful tools - cluttering their output makes them much less convenient / more time-consuming to use. I have about 8 mounts for snap and like 15 for cgroups here. And actually about 10 others that I don't remember seeing before at all. pstore? securityfs? tracefs? debugfs?
- bxparks 6y agoYup, the output of df became so cluttered that it became useless. So I created this alias: > alias df='df -x tmpfs -x squashfs -x devtmpfs'
- edoceo 6y agoAdding to my dotfiles, thx!
- apple4ever 6y agoOh my this is awesome! Thank you. So much better.
- omertuchfeld 6y agoHere's one that doesn't hide the snaps but but still keeps it not cluttered (relies on ripgrep) : function df { OUTPUT=$(/usr/bin/df $@) snaps=$(echo ${OUTPUT} | rg "^.+/snap/(.+)/.+$" -r '$1' | tr '\n' ' ') printf "\x1b[33m\x1b[1mFILTERING SNAP MOUNTPOINTS:\x1b[0m\x1b[33m\n$snaps\x1b[0m\n\n" >&2 echo $OUTPUT | grep -v "/snap/" }