4 ms·
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'
by bxparks 6y ago
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'
- 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/" }