taming mount output

Bryn M. Reeves bmr at redhat.com
Wed Feb 8 15:10:18 UTC 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/08/2012 04:59 AM, Geoffrey Leach wrote:
> The output of F16 mount is somewhat confusing. Is there a way to 
> confine it to just the output of interest to the average user?
> 
> Thanks. Sorry for the FAQ.

You may find findmnt provides a more digestible list of mounted file
systems on modern Fedora boxes. It will search fstab, mtab or
/proc/self/mountinfo and report the file systems it finds in a variety
of formats.

On a simple vm with little in /etc/fstab mount prints:

http://fpaste.org/H0kf/

Whereas findmnt shows me:

http://fpaste.org/z6f4/

If I only care about things specified in /etc/fstab:

# findmnt -s
TARGET SOURCE                                    FSTYPE OPTIONS
/      /dev/mapper/vg_rawhide-lv_root            ext4   defaults
/boot  UUID=765338a0-b8f7-44b6-9178-3143eb94a119 ext4   defaults
swap   /dev/mapper/vg_rawhide-lv_swap            swap   defaults

Where is sda2 mounted?:
http://fpaste.org/A6WZ/

What is mounted at /run?:
http://fpaste.org/kiPH/

The command can also do more fancy things like poll a mount point for
activity (mount, umount, remount etc) and resolving LABEL and UUID
references in the fstab to the real device paths.

More options and examples are available in the man page.

Regards,
Bryn.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk8ykFoACgkQ6YSQoMYUY97ZzQCgkz8h8zTMAEZ9GxqtAnOTu4QJ
kuQAn3uCz2PGJk727f1Sd+iOmrrXh03r
=4j4f
-----END PGP SIGNATURE-----


More information about the users mailing list