summaryrefslogtreecommitdiffstats
path: root/misc-utils/findmnt.8
diff options
context:
space:
mode:
authorKarel Zak2015-03-19 12:08:30 +0100
committerKarel Zak2015-03-19 12:12:21 +0100
commit0009f510cb4bafabbec0d26acd7385436c3e7c8b (patch)
treeef70e8fab20dc7fa0deb44cc5926481c88d6f6e7 /misc-utils/findmnt.8
parenttests: start script/race test only when --force specified (diff)
downloadkernel-qcow2-util-linux-0009f510cb4bafabbec0d26acd7385436c3e7c8b.tar.gz
kernel-qcow2-util-linux-0009f510cb4bafabbec0d26acd7385436c3e7c8b.tar.xz
kernel-qcow2-util-linux-0009f510cb4bafabbec0d26acd7385436c3e7c8b.zip
findmnt: add --mountpoint command line option
The current --target <path> implementation check the <path> elements in reverse order to get the mountpoint. The feature may be inwanted in some cases when we really want to check for mountpoint specified by the <path>. The new option "--mountpoint <path>" allows to be strict. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils/findmnt.8')
-rw-r--r--misc-utils/findmnt.825
1 files changed, 17 insertions, 8 deletions
diff --git a/misc-utils/findmnt.8 b/misc-utils/findmnt.8
index 31c614ae1..620e422de 100644
--- a/misc-utils/findmnt.8
+++ b/misc-utils/findmnt.8
@@ -13,7 +13,7 @@ findmnt \- find a filesystem
[options]
.RB [ \-\-source ]
.IR device
-.RB [ \-\-target ]
+.RB [ \-\-target | \-\-mountpoint ]
.IR mountpoint
.SH DESCRIPTION
.B findmnt
@@ -31,9 +31,13 @@ or
is not given, all filesystems are shown.
.PP
The device may be specified by device name, maj:min, filesystem LABEL or UUID,
-or partition PARTUUID or PARTLABEL. Note that a device name may be interpreted
-as a mountpoint (and vice versa) if the \fB--target\fR or \fB--source\fR options
-are not specified.
+or partition PARTUUID or PARTLABEL. Note that
+.B findmnt
+follows
+.BR mount (8)
+behavior where a device name may be interpreted
+as a mountpoint (and vice versa) if the \fB--target\fR, \fB--mountpoint\fR or
+\fB--source\fR options are not specified.
.PP
The command prints all mounted filesystems in the tree-like format by default.
.SH OPTIONS
@@ -96,6 +100,9 @@ output is restricted by the \fB\-t\fP, \fB\-O\fP, \fB\-S\fP or \fB\-T\fP
option and the option \fB\-\-submounts\fP is not used or if more that one
source file (the option \fB\-F\fP) is specified.
.TP
+.BR \-M , " \-\-mountpoint \fIpath\fP"
+Explicitly define the mountpoint file or directory. See also \fB\-\-target\fP.
+.TP
.BR \-m , " \-\-mtab"
Search in
.IR /etc/mtab .
@@ -186,11 +193,13 @@ Search in
The output is in the list format (see \fB--list\fR).
.TP
.BR \-T , " \-\-target \fIpath\fP"
-Explicitly define the mount target (mountpoint directory). If the \fIpath\fR
+Define the mount target. If the \fIpath\fR
is not a mountpoint file or directory than
.B findmnt
checks \fIpath\fR elements in reverse order for get the mountpoint (this feature is
-supported only if search in kernel files and unsupported for \fB\-\-fstab\fP).
+supported only if search in kernel files and unsupported for \fB\-\-fstab\fP). It's
+recommended to use the option \fB--mountpoint\fR when checks \fIpath\fR elements is
+unwanted and \fIpath\fR is strictly specified mountpoint.
.TP
.BR \-t , " \-\-types \fIlist\fP"
Limit the set of printed filesystems. More than one type may be
@@ -239,9 +248,9 @@ Prints all
filesystems and converts LABEL= and UUID= tags to the real device names.
.IP "\fBfindmnt -n --raw --evaluate --output=target LABEL=/boot\fP"
Prints only the mountpoint where the filesystem with label "/boot" is mounted.
-.IP "\fBfindmnt --poll --target /mnt/foo\fP"
+.IP "\fBfindmnt --poll --mountpoint /mnt/foo\fP"
Monitors mount, unmount, remount and move on /mnt/foo.
-.IP "\fBfindmnt --poll=umount --first-only --target /mnt/foo\fP"
+.IP "\fBfindmnt --poll=umount --first-only --mountpoint /mnt/foo\fP"
Waits for /mnt/foo unmount.
.IP "\fBfindmnt --poll=remount -t ext3 -O ro\fP"
Monitors remounts to read-only mode on all ext3 filesystems.