From my point of view the most attractive for end users is findmnt(8). This new util is a command line interface to the libmount library, the util is able to search in /etc/fstab, /etc/mtab or /proc/self/mountinfo.
Default output (mounted filesystems):
$ findmntGet info about a mountpoint:
TARGET SOURCE FSTYPE OPTIONS
/ /dev/sda4 ext3 rw,noatime,errors=co
├─/proc /proc proc rw,relatime
│ ├─/proc/bus/usb /proc/bus/usb usbfs rw,relatime
│ ├─/proc/sys/fs/binfmt_misc none binfmt_m rw,relatime
│ └─/proc/fs/nfsd nfsd nfsd rw,relatime
├─/sys /sys sysfs rw,relatime
├─/dev udev devtmpfs rw,relatime,size=197
│ ├─/dev/pts devpts devpts rw,relatime,gid=5,mo
│ └─/dev/shm tmpfs tmpfs rw,relatime
├─/boot /dev/sda1 ext3 rw,noatime,errors=co
├─/home/kzak /dev/mapper/kzak-home ext4 rw,noatime,barrier=1
│ └─/home/kzak/.gvfs gvfs-fuse-daemon fuse.gvf rw,nosuid,nodev,rela
├─/var/lib/nfs/rpc_pipefs sunrpc rpc_pipe rw,relatime
├─/mnt/foo //sr.net.home/foo cifs rw,relatime,mand,unc
└─/mnt/test /dev/sda6 btrfs rw,relatime
$ findmnt /home/kzakGet all mounted extN filesystems:
TARGET SOURCE FSTYPE OPTIONS
/home/kzak /dev/mapper/kzak-home ext4 rw,noatime,barrier=1,data=ordered
$ findmnt -t ext4,ext3The same thing, but from fstab:
TARGET SOURCE FSTYPE OPTIONS
/ /dev/sda4 ext3 rw,noatime,errors=continue,user_xattr
/boot /dev/sda1 ext3 rw,noatime,errors=continue,user_xattr
/home/kzak /dev/mapper/kzak-home ext4 rw,noatime,barrier=1,data=ordered
$ findmnt --fstab -t ext4,ext3Don't like LABLEs/UUIDs?
TARGET SOURCE FSTYPE OPTIONS
/ UUID=d3a8f783-df75-4dc8-9163-975a891052c0 ext3 noatime,defaults
/boot UUID=f1cd38fa-c887-4ab8-834b-c8ee659b97fe ext3 noatime,defaults
/home/kzak /dev/mapper/kzak-home ext4 noatime,defaults
$ findmnt --fstab --evaluate -t ext4,ext3or convert UUID to mountpoint:
TARGET SOURCE FSTYPE OPTIONS
/ /dev/sda4 ext3 noatime,defaults
/boot /dev/sda1 ext3 noatime,defaults
/home/kzak /dev/mapper/kzak-home ext4 noatime,defaults
$ findmnt -o TARGET --noheadings UUID=f1cd38fa-c887-4ab8-834b-c8ee659b97fe
/boot
No comments:
Post a Comment