2 .TH FINDMNT 8 "June 2014" "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 device may be specified by device name, maj:min, filesystem LABEL or UUID,
35 or partition PARTUUID or PARTLABEL. Note that a device name may be interpreted
36 as a mountpoint (and vice versa) if the \fB--target\fR or \fB--source\fR options
39 The command prints all mounted filesystems in the tree-like format by default.
43 Disable all built-in filters and print all filesystems.
45 .BR \-a , " \-\-ascii"
46 Use ascii characters for tree formatting.
48 .BR \-b , " \-\-bytes"
49 Print the SIZE, USED and AVAIL column in bytes rather than in a human-readable format.
51 .BR \-C , " \-\-nocanonicalize"
52 Do not canonicalize paths at all. This option affects the comparing of paths
53 and the evaluation of tags (LABEL, UUID, etc.).
55 .BR \-c , " \-\-canonicalize"
56 Canonicalize all printed paths.
61 This option is equivalent to
62 .B -o SOURCE,FSTYPE,SIZE,USED,AVAIL,USE%,TARGET
63 but excludes all pseudo filesystems.
64 Use \fB\-\-all\fP to print all filesystems.
66 .BR \-d , " \-\-direction \fIword\fP"
67 The search direction, either
72 .BR \-e , " \-\-evaluate"
73 Convert all tags (LABEL, UUID, PARTUUID or PARTLABEL) to the device names.
75 .BR \-F , " \-\-tab\-file \fIpath\fP"
76 Search in an alternative file. If used with \fB\-\-fstab\fP, \fB\-\-mtab\fP
77 or \fB\-\-kernel\fP, then it overrides the default paths. If specified more
78 than once, then tree-like output is disabled (see the \fB\-\-list\fP option).
80 .BR \-f , " \-\-first\-only"
81 Print the first matching filesystem only.
84 Display help text and exit.
86 .BR \-i , " \-\-invert"
87 Invert the sense of matching.
89 .BR \-k , " \-\-kernel"
91 .IR /proc/self/mountinfo .
92 The output is in the tree-like format. This is the default.
95 Use the list output format. This output format is automatically enabled if the
96 output is restricted by the \fB\-t\fP, \fB\-O\fP, \fB\-S\fP or \fB\-T\fP
97 option and the option \fB\-\-submounts\fP is not used or if more that one
98 source file (the option \fB\-F\fP) is specified.
100 .BR \-m , " \-\-mtab"
103 The output is in the list format (see \fB\-\-list\fP).
105 .BR \-N , " \-\-task \fItid\fP"
106 Use alternative namespace /proc/<tid>/mountinfo rather than the default
107 /proc/self/mountinfo. If the option is specified more than once, then
108 tree-like output is disabled (see the \fB\-\-list\fP option). See also the
112 .BR \-n , " \-\-noheadings"
113 Do not print a header line.
115 .BR \-O , " \-\-options \fIlist\fP"
116 Limit the set of printed filesystems. More than one option
117 may be specified in a comma-separated list. The
121 options are cumulative in effect. It is different from
123 in that each option is matched exactly; a leading
125 at the beginning does not have global meaning. The "no" can used for
126 individual items in the list. The "no" prefix interpretation can be disabled
129 .BR \-o , " \-\-output \fIlist\fP"
130 Define output columns. See the \fB\-\-help\fP output to get a list of the
131 currently supported columns. The
133 column contains tree formatting if the
137 options are not specified.
139 The default list of columns may be extended if \fIlist\fP is
140 specified in the format \fI+list\fP (e.g. \fBfindmnt -o +PROPAGATION\fP).
142 .BR \-P , " \-\-pairs"
143 Use key="value" output format. All potentially unsafe characters are hex-escaped (\\x<code>).
145 .BR \-p , " \-\-poll\fR[\fI=list\fR]"
146 Monitor changes in the /proc/self/mountinfo file. Supported actions are: mount,
147 umount, remount and move. More than one action may be specified in a
148 comma-separated list. All actions are monitored by default.
150 The time for which \fB--poll\fR will block can be restricted with the \fB\-\-timeout\fP
151 or \fB\-\-first-only\fP options.
153 The standard columns always use the new version of the information from the
154 mountinfo file, except the umount action which is based on the original
155 information cached by
157 The poll mode allows to use extra columns:
161 mount, umount, move or remount action name; this column is enabled by default
164 available for umount and move actions
167 available for umount and remount actions
170 .BR \-R , " \-\-submounts"
171 Print recursively all submounts for the selected filesystems. The restrictions
172 defined by options \fB\-t\fP, \fB\-O\fP, \fB\-S\fP, \fB\-T\fP and
173 \fB\--direction\fP are not applied to submounts. All submounts are always
174 printed in tree-like order. The option enables the tree-like output format by
175 default. This option has no effect for \fB\-\-mtab\fP or \fB\-\-fstab\fP.
178 Use raw output format. All potentially unsafe characters are hex-escaped (\\x<code>).
180 .BR \-S , " \-\-source \fIspec\fP"
181 Explicitly define the mount source. Supported are \fIdevice\fR, \fImaj:min\fR,
182 \fILABEL=\fR, \fIUUID=\fR, \fIPARTLABEL=\fR or \fIPARTUUID=\fR.
184 .BR \-s , " \-\-fstab"
187 The output is in the list format (see \fB--list\fR).
189 .BR \-T , " \-\-target \fIdir\fP"
190 Explicitly define the mount target (mountpoint directory).
192 .BR \-t , " \-\-types \fIlist\fP"
193 Limit the set of printed filesystems. More than one type may be
194 specified in a comma-separated list. The list of filesystem types can be
197 to specify the filesystem types on which no action should be taken. For
201 .BR \-U , " \-\-uniq"
202 Ignore filesystems with duplicate mount targets, thus effectively skipping
203 over-mounted mount points.
205 .BR \-u , " \-\-notruncate"
206 Do not truncate text in columns. The default is to not truncate the
213 columns. This option disables text truncation also in all other columns.
215 .BR \-v , " \-\-nofsroot"
216 Do not print a [/dir] in the SOURCE column for bind-mounts or btrfs subvolumes.
218 .BR \-w , " \-\-timeout \fImilliseconds\fP"
219 Specify an upper limit on the time for which \fB--poll\fR will block, in milliseconds.
221 .IP "\fBfindmnt \-\-fstab \-t nfs\fP"
222 Prints all NFS filesystems defined in
224 .IP "\fBfindmnt \-\-fstab /mnt/foo\fP"
227 filesystems where the mountpoint directory is /mnt/foo. It also prints bind mounts where /mnt/foo
229 .IP "\fBfindmnt \-\-fstab --target /mnt/foo\fP"
232 filesystems where the mountpoint directory is /mnt/foo.
233 .IP "\fBfindmnt --fstab --evaluate\fP"
236 filesystems and converts LABEL= and UUID= tags to the real device names.
237 .IP "\fBfindmnt -n --raw --evaluate --output=target LABEL=/boot\fP"
238 Prints only the mountpoint where the filesystem with label "/boot" is mounted.
239 .IP "\fBfindmnt --poll --target /mnt/foo\fP"
240 Monitors mount, unmount, remount and move on /mnt/foo.
241 .IP "\fBfindmnt --poll=umount --first-only --target /mnt/foo\fP"
242 Waits for /mnt/foo unmount.
243 .IP "\fBfindmnt --poll=remount -t ext3 -O ro\fP"
244 Monitors remounts to read-only mode on all ext3 filesystems.
246 .IP LIBMOUNT_FSTAB=<path>
247 overrides the default location of the fstab file
248 .IP LIBMOUNT_MTAB=<path>
249 overrides the default location of the mtab file
250 .IP LIBMOUNT_DEBUG=all
251 enables libmount debug output
252 .IP LIBSMARTCOLS_DEBUG=all
253 enables libsmartcols debug output
256 Karel Zak <kzak@redhat.com>
262 The findmnt command is part of the util-linux package and is available from
263 ftp://ftp.kernel.org/pub/linux/utils/util-linux/.