[ale] df Aliases to remove cruft from loop devices?

Ben Coleman oloryn at benshome.net
Tue May 28 13:42:32 EDT 2019


On 5/28/2019 10:07 AM, DJ-Pfulio via Ale wrote:
> I can't be the only person tired of seeing loop devices in our 'df'
> output.  To strip that down a little, so just the useful things are shown,
> 
>     alias dft="df -Th|grep '^/dev'"
> 
> is what I've been playing with. Perhaps there's a better answer?

I note this seems to be an issue only on Ubuntu desktop, not server.

Anyhow, given that on my one Ubuntu desktop, all of the snap lines in df
output start with '/dev/loop', that isn't real helpful.  Perhaps instead
use:

alias dft="df -Th|grep -v '^/dev/loop'"

or, more precisely (in case you have some /dev/loop*'s that aren't snaps):

alias dft="df -Th|grep -v '^/dev/loop.*/snap/'"

Ben
-- 
Ben Coleman oloryn at benshome.net | For the wise man, doing right trumps
http://oloryn.benshome.net/     | looking right.  For the fool, looking
Amateur Radio NJ8J              | right trumps doing right.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://mail.ale.org/pipermail/ale/attachments/20190528/edbaf9be/attachment.sig>


More information about the Ale mailing list