2 .TH FINDMNT 8 "April 2010" "util-linux" "System Administration"
4 findmnt \- find a filesystem
11 .IR device | mountpoint
21 will list all mounted filesytems or search for a filesystem. The
23 command is able to search in
27 .IR /proc/self/mountinfo .
32 is not given, all filesystems are shown.
34 The command prints all mounted filesystems in the tree-like format by default.
36 .IP "\fB\-h, \-\-help\fP"
38 .IP "\fB\-s, \-\-fstab\fP"
41 The output is in the list format (see --list).
42 .IP "\fB\-m, \-\-mtab\fP"
45 The output is in the list format (see --list).
46 .IP "\fB\-k, \-\-kernel\fP"
48 .IR /proc/self/mountinfo .
49 The output is in the tree-like format. This is the default.
50 .IP "\fB\-c, \-\-canonicalize\fP"
51 Canonicalize all printed paths.
52 .IP "\fB\-d, \-\-direction \fIword\fP"
53 The search direction -
57 .IP "\fB\-e, \-\-evaluate\fP"
58 Convert all tags (LABEL or UUID) to the device names.
59 .IP "\fB\-F, \-\-tab\-file \fIpath\fP"
60 Search in an alternative file, if used with \fB\-\-fstab\fP, \fB\-\-mtab\fP
61 or \fB\-\-kernel\fP then overwrites the default paths.
62 .IP "\fB\-f, \-\-first\-only\fP"
63 Print the first matching filesystem only.
64 .IP "\fB\-i, \-\-invert\fP"
65 Invert the sense of matching.
66 .IP "\fB\-l, \-\-list\fP"
67 Use the list output format. This output format is automatically enabled if the
68 output is restricted by \fB\-t\fP, \fB\-O\fP, \fB\-S\fP or \fB\-T\fP
69 option and the option \fB\-\-submounts\fP is not used.
70 .IP "\fB\-v, \-\-nofsroot\fP"
71 Do not print a [/dir] in the SOURCE column for bind-mounts or btrfs subvolumes.
72 .IP "\fB\-n, \-\-noheadings\fP"
73 Do not print a header line.
74 .IP "\fB\-u, \-\-notruncate\fP"
75 Do not truncate text in columns. The default is to not truncate the
81 columns. This option disables text truncation also in all other columns.
82 .IP "\fB\-O, \-\-options \fIlist\fP"
83 Limit the set of printed filesystems. More than one option
84 may be specified in a comma-separated list. The
88 options are cumulative in effect. It is different from
90 in that each option is matched exactly; a leading
92 at the beginning does not have global meaning. The "no" could used for
93 individual items in the list. The "no" prefix interpratation could be disabled
95 .IP "\fB\-o, \-\-output \fIlist\fP"
96 Define output columns. Currently supported are
111 column contains tree formatting if the
115 options are not specified.
116 .IP "\fB\-p, \-\-poll\fR[\fI=list\fR]\fP"
117 Monitor changes in the /proc/self/mountinfo file. Supported actions are: mount,
118 umount, remount and move. More than one action may be specified in a
119 comma-separated list. All actions are monitored by default.
121 The time for which \fB--poll\fR will block can be restricted with the \fB\-\-timeout\fP
122 or \fB\-\-first-only\fP options.
124 The standard columns always use the new version of the information from the
125 mountinfo file, except the umount action which is based on the original
126 information cached by
128 The poll mode allows to use extra columns:
132 mount, umount, move or remount action name; this column is enabled by default
135 available for umount and move actions
138 available for umount and remount actions
140 .IP "\fB\-r, \-\-raw\fP"
141 Use raw output format.
142 .IP "\fB\-a, \-\-ascii\fP"
143 Use ascii characters for tree formatting.
144 .IP "\fB\-t, \-\-types \fIlist\fP"
145 Limit the set of printed filesystems. More than one type may be
146 specified in a comma-separated list. The list of filesystem types can be
149 to specify the filesystem types on which no action should be taken. For
152 .IP "\fB\-R, \-\-submounts\fP"
153 Print recursively all submounts for the selected filesystems. The restrictions
154 defined by options \fB\-t\fP, \fB\-O\fP, \fB\-S\fP, \fB\-T\fP and
155 \fB\--direction\fP are not applied to submounts. All submounts are always
156 printed in tree-like order. The option enables the tree-like output format by
157 default. This option has no effect for \fB\-\-mtab\fP or \fB\-\-fstab\fP.
158 .IP "\fB\-S, \-\-source \fIspec\fP"
159 Explicitly define the mount source. Supported are \fIdevice\fR, \fILABEL=\fR and \fIUUID=\fR.
160 .IP "\fB\-T, \-\-target \fIdir\fP"
161 Explicitly define the mount target (mountpoint directory).
162 .IP "\fB\-w, \-\-timeout \fImilliseconds\fP"
163 Specify an upper limit on the time for which \fB--poll\fR will block, in milliseconds.
165 .IP "\fBfindmnt \-\-fstab \-t nfs\fP"
166 Prints all nfs filesystems defined in
168 .IP "\fBfindmnt \-\-fstab /mnt/foo\fP"
171 filesystems where the mountpoint directory is /mnt/foo. It also prints bind mounts where /mnt/foo
173 .IP "\fBfindmnt \-\-fstab --target /mnt/foo\fP"
176 filesystems where the mountpoint directory is /mnt/foo.
177 .IP "\fBfindmnt --fstab --evaluate\fP"
180 filesystems and converts LABEL= and UUID= tags to the real device names.
181 .IP "\fBfindmnt -n --raw --evaluate --output=target LABEL=/boot\fP"
182 Prints only the mountpoint where the filesystem with label "/boot" is mounted.
183 .IP "\fBfindmnt --poll --target /mnt/foo\fP"
184 Monitors mount, umount, remount and move on /mnt/foo.
185 .IP "\fBfindmnt --poll=umount --first-only --target /mnt/foo\fP"
186 Waits for /mnt/foo umount.
187 .IP "\fBfindmnt --poll=remount -t ext3 -O ro\fP"
188 Monitors remounts to read-only mode on all ext3 filesystems.
190 .IP LIBMOUNT_FSTAB=<path>
191 overrides the default location of the fstab file
192 .IP LIBMOUNT_MTAB=<path>
193 overrides the default location of the mtab file
194 .IP LIBMOUNT_DEBUG=0xffff
198 Karel Zak <kzak@redhat.com>
204 The findmnt command is part of the util-linux package and is available from
205 ftp://ftp.kernel.org/pub/linux/utils/util-linux/.