taming mount output
Steven P. Ulrick
meow8282 at gmail.com
Wed Feb 8 17:04:55 UTC 2012
On 02/08/2012 09:10 AM, Bryn M. Reeves wrote:
> -----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.
Try this option that I found in the man page:
findmnt --fstab --evaluate
This changed the output of "mount" on my system from something like your
first paste to this:
steve at localhost ~$ findmnt --fstab --evaluate
TARGET SOURCE FSTYPE OPTIONS
/ /dev/sda2 ext4 defaults
/boot /dev/sda1 ext4 defaults
/home /dev/sda6 ext4 defaults
/mnt/mirror /dev/sdc1 ext4 defaults
/mnt/mirror2 /dev/sdb1 ext4 defaults
/usr/local /dev/sda5 ext4 defaults
swap /dev/mapper/VolGroup00-LogVol01 swap defaults
Steven P. Ulrick
More information about the users
mailing list