Re:Linux Mint Dumps Ubuntu Snap
by karatestomp on Friday June 05, 2020 @05:09PM
(#23434001)
Launch times and (silly, but it really bugged me) pollution of my `df` output drove me away.
[ Parent
| on HN ]
Cluttering 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?
Yup, 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'
Re:Linux Mint Dumps Ubuntu Snap
by omertuchfeld on Saturday June 06, 2020 @02:17AM
(#23437217)
Here'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/" }
Re:Linux Mint Dumps Ubuntu Snap
by apple4ever on Friday June 05, 2020 @09:38PM
(#23436036)
Oh my this is awesome! Thank you. So much better.