df -h without loop listing??

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

df -h without loop listing??

Dave Stevens
I don't see an option for df to omit these /dev/loopXX lines,
currently 28 of them. Does anyone know how to do this?

d

like this:

 df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            2.8G     0  2.8G   0% /dev
tmpfs           571M  1.5M  570M   1% /run
/dev/sda1       687G   15G  637G   3% /
tmpfs           2.8G     0  2.8G   0% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           2.8G     0  2.8G   0% /sys/fs/cgroup
/dev/loop2      3.8M  3.8M     0 100% /snap/gnome-system-monitor/87
/dev/loop3      152M  152M     0 100% /snap/gnome-3-28-1804/36
/dev/loop4      141M  141M     0 100% /snap/gnome-3-26-1604/86
/dev/loop5      152M  152M     0 100% /snap/gnome-3-28-1804/40

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: df -h without loop listing??

Colin Watson
On Wed, Jun 19, 2019 at 04:19:22PM -0700, Dave Stevens wrote:
> I don't see an option for df to omit these /dev/loopXX lines,
> currently 28 of them. Does anyone know how to do this?

They're all of the "squashfs" type (as "df -T" will show), so "df -x
squashfs" will do it.

--
Colin Watson                                       [[hidden email]]

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: df -h without loop listing??

Robert Heller
At Thu, 20 Jun 2019 00:34:47 +0100 "Ubuntu user technical support,  not for general discussions" <[hidden email]> wrote:

>
> On Wed, Jun 19, 2019 at 04:19:22PM -0700, Dave Stevens wrote:
> > I don't see an option for df to omit these /dev/loopXX lines,
> > currently 28 of them. Does anyone know how to do this?
>
> They're all of the "squashfs" type (as "df -T" will show), so "df -x
> squashfs" will do it.

In the more general case (/dev/loop mounts in general, eg ISO images or other
sorts of images), piping throgh 'grep -v ...' will also work:

df -h | grep -v /dev/loop

Plumbing is a wonderful and powerful thing...

--
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Custom Software Services
http://www.deepsoft.com/  -- Linux Administration Services
[hidden email]       -- Webhosting Services
             

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: df -h without loop listing??

Dave Stevens
On Wed, 19 Jun 2019 19:55:13 -0400 (EDT)
Robert Heller <[hidden email]> wrote:

> At Thu, 20 Jun 2019 00:34:47 +0100 "Ubuntu user technical support,
> not for general discussions" <[hidden email]> wrote:
>
> >
> > On Wed, Jun 19, 2019 at 04:19:22PM -0700, Dave Stevens wrote:  
> > > I don't see an option for df to omit these /dev/loopXX lines,
> > > currently 28 of them. Does anyone know how to do this?  
> >
> > They're all of the "squashfs" type (as "df -T" will show), so "df -x
> > squashfs" will do it.  
>
> In the more general case (/dev/loop mounts in general, eg ISO images
> or other sorts of images), piping throgh 'grep -v ...' will also work:
>
> df -h | grep -v /dev/loop
>
> Plumbing is a wonderful and powerful thing...
>

yes, thanks, works! I asked because I remember vaguely seeing an
answer to a similar question that used an undocumented switch. I'd have
to read the code to see that I suppose, it wasn't on the man page.

D

--
In modern fantasy (literary or governmental), killing people is the
usual solution to the so-called war between good and evil. My books are
not conceived in terms of such a war, and offer no simple answers to
simplistic questions.

----- Ursula Le Guin

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users