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\-P, \-\-pairs\fP"
141 Use key="value" output format.
142 .IP "\fB\-r, \-\-raw\fP"
143 Use raw output format.
144 .IP "\fB\-a, \-\-ascii\fP"
145 Use ascii characters for tree formatting.
146 .IP "\fB\-t, \-\-types \fIlist\fP"
147 Limit the set of printed filesystems. More than one type may be
148 specified in a comma-separated list. The list of filesystem types can be
151 to specify the filesystem types on which no action should be taken. For
154 .IP "\fB\-R, \-\-submounts\fP"
155 Print recursively all submounts for the selected filesystems. The restrictions
156 defined by options \fB\-t\fP, \fB\-O\fP, \fB\-S\fP, \fB\-T\fP and
157 \fB\--direction\fP are not applied to submounts. All submounts are always
158 printed in tree-like order. The option enables the tree-like output format by
159 default. This option has no effect for \fB\-\-mtab\fP or \fB\-\-fstab\fP.
160 .IP "\fB\-S, \-\-source \fIspec\fP"
161 Explicitly define the mount source. Supported are \fIdevice\fR, \fILABEL=\fR and \fIUUID=\fR.
162 .IP "\fB\-T, \-\-target \fIdir\fP"
163 Explicitly define the mount target (mountpoint directory).
164 .IP "\fB\-w, \-\-timeout \fImilliseconds\fP"
165 Specify an upper limit on the time for which \fB--poll\fR will block, in milliseconds.
167 .IP "\fBfindmnt \-\-fstab \-t nfs\fP"
168 Prints all nfs filesystems defined in
170 .IP "\fBfindmnt \-\-fstab /mnt/foo\fP"
173 filesystems where the mountpoint directory is /mnt/foo. It also prints bind mounts where /mnt/foo
175 .IP "\fBfindmnt \-\-fstab --target /mnt/foo\fP"
178 filesystems where the mountpoint directory is /mnt/foo.
179 .IP "\fBfindmnt --fstab --evaluate\fP"
182 filesystems and converts LABEL= and UUID= tags to the real device names.
183 .IP "\fBfindmnt -n --raw --evaluate --output=target LABEL=/boot\fP"
184 Prints only the mountpoint where the filesystem with label "/boot" is mounted.
185 .IP "\fBfindmnt --poll --target /mnt/foo\fP"
186 Monitors mount, umount, remount and move on /mnt/foo.
187 .IP "\fBfindmnt --poll=umount --first-only --target /mnt/foo\fP"
188 Waits for /mnt/foo umount.
189 .IP "\fBfindmnt --poll=remount -t ext3 -O ro\fP"
190 Monitors remounts to read-only mode on all ext3 filesystems.
192 .IP LIBMOUNT_FSTAB=<path>
193 overrides the default location of the fstab file
194 .IP LIBMOUNT_MTAB=<path>
195 overrides the default location of the mtab file
196 .IP LIBMOUNT_DEBUG=0xffff
200 Karel Zak <kzak@redhat.com>
206 The findmnt command is part of the util-linux package and is available from
207 ftp://ftp.kernel.org/pub/linux/utils/util-linux/.