.\" -*- nroff -*- .TH FINDMNT 8 "June 2014" "util-linux" "System Administration" .SH NAME findmnt \- find a filesystem .SH SYNOPSIS .B findmnt .RB [ options ] .sp .B findmnt .RB [ options ] .IR device | mountpoint .sp .B findmnt .RB [ options ] .RB [ \--source ] .IR device .RB [ \--target ] .IR mountpoint .SH DESCRIPTION .B findmnt will list all mounted filesytems or search for a filesystem. The .B findmnt command is able to search in .IR /etc/fstab , .IR /etc/mtab or .IR /proc/self/mountinfo . If .IR device or .IR mountpoint 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. .PP The command prints all mounted filesystems in the tree-like format by default. .SH OPTIONS .TP .BR \-A , " \-\-all" Disable all built-in filters and print all filesystems. .TP .BR \-a , " \-\-ascii" Use ascii characters for tree formatting. .TP .BR \-b , " \-\-bytes" Print the SIZE, USED and AVAIL column in bytes rather than in a human-readable format. .TP .BR \-C , " \-\-nocanonicalize" Do not canonicalize paths at all. This option affects the comparing of paths and the evaluation of tags (LABEL, UUID, etc.). .TP .BR \-c , " \-\-canonicalize" Canonicalize all printed paths. .TP .BR \-D , " \-\-df" Imitate the output of .BR df (1). This option is equivalent to .B -o SOURCE,FSTYPE,SIZE,USED,AVAIL,USE%,TARGET but excludes all pseudo filesystems. Use \fB\-\-all\fP to print all filesystems. .TP .BR \-d , " \-\-direction \fIword\fP" The search direction, either .B forward or .BR backward . .TP .BR \-e , " \-\-evaluate" Convert all tags (LABEL, UUID, PARTUUID or PARTLABEL) to the device names. .TP .BR \-F , " \-\-tab\-file \fIpath\fP" Search in an alternative file. If used with \fB\-\-fstab\fP, \fB\-\-mtab\fP or \fB\-\-kernel\fP, then it overrides the default paths. If specified more than once, then tree-like output is disabled (see the \fB\-\-list\fP option). .TP .BR \-f , " \-\-first\-only" Print the first matching filesystem only. .TP .BR \-h , " \-\-help" Display help text and exit. .TP .BR \-i , " \-\-invert" Invert the sense of matching. .TP .BR \-k , " \-\-kernel" Search in .IR /proc/self/mountinfo . The output is in the tree-like format. This is the default. .TP .BR \-l , " \-\-list" Use the list output format. This output format is automatically enabled if the 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 , " \-\-mtab" Search in .IR /etc/mtab . The output is in the list format (see \fB\-\-list\fP). .TP .BR \-N , " \-\-task \fItid\fP" Use alternative namespace /proc//mountinfo rather than the default /proc/self/mountinfo. If the option is specified more than once, then tree-like output is disabled (see the \fB\-\-list\fP option). See also the .BR unshare (1) command. .TP .BR \-n , " \-\-noheadings" Do not print a header line. .TP .BR \-O , " \-\-options \fIlist\fP" Limit the set of printed filesystems. More than one option may be specified in a comma-separated list. The .B \-t and .B \-O options are cumulative in effect. It is different from .B \-t in that each option is matched exactly; a leading .I no at the beginning does not have global meaning. The "no" can used for individual items in the list. The "no" prefix interpretation can be disabled by "+" prefix. .TP .BR \-o , " \-\-output \fIlist\fP" Define output columns. See the \fB\-\-help\fP output to get a list of the currently supported columns. The .BR TARGET column contains tree formatting if the .B \-\-list or .B \-\-raw options are not specified. The default list of columns may be extended if \fIlist\fP is specified in the format \fI+list\fP (e.g. \fBfindmnt -o +PROPAGATION\fP). .TP .BR \-P , " \-\-pairs" Use key="value" output format. All potentially unsafe characters are hex-escaped (\\x). .TP .BR \-p , " \-\-poll\fR[\fI=list\fR]" Monitor changes in the /proc/self/mountinfo file. Supported actions are: mount, umount, remount and move. More than one action may be specified in a comma-separated list. All actions are monitored by default. The time for which \fB--poll\fR will block can be restricted with the \fB\-\-timeout\fP or \fB\-\-first-only\fP options. The standard columns always use the new version of the information from the mountinfo file, except the umount action which is based on the original information cached by .BR findmnt (8) . The poll mode allows to use extra columns: .RS .TP .B ACTION mount, umount, move or remount action name; this column is enabled by default .TP .B OLD-TARGET available for umount and move actions .TP .B OLD-OPTIONS available for umount and remount actions .RE .TP .BR \-R , " \-\-submounts" Print recursively all submounts for the selected filesystems. The restrictions defined by options \fB\-t\fP, \fB\-O\fP, \fB\-S\fP, \fB\-T\fP and \fB\--direction\fP are not applied to submounts. All submounts are always printed in tree-like order. The option enables the tree-like output format by default. This option has no effect for \fB\-\-mtab\fP or \fB\-\-fstab\fP. .TP .BR \-r , " \-\-raw" Use raw output format. All potentially unsafe characters are hex-escaped (\\x). .TP .BR \-S , " \-\-source \fIspec\fP" Explicitly define the mount source. Supported are \fIdevice\fR, \fImaj:min\fR, \fILABEL=\fR, \fIUUID=\fR, \fIPARTLABEL=\fR or \fIPARTUUID=\fR. .TP .BR \-s , " \-\-fstab" Search in .IR /etc/fstab . The output is in the list format (see \fB--list\fR). .TP .BR \-T , " \-\-target \fIdir\fP" Explicitly define the mount target (mountpoint directory). .TP .BR \-t , " \-\-types \fIlist\fP" Limit the set of printed filesystems. More than one type may be specified in a comma-separated list. The list of filesystem types can be prefixed with .I no to specify the filesystem types on which no action should be taken. For more details see .BR mount (8). .TP .BR \-u , " \-\-notruncate" Do not truncate text in columns. The default is to not truncate the .BR TARGET , .BR SOURCE , .BR UUID , .BR LABEL , .BR PARTUUID , .BR PARTLABEL columns. This option disables text truncation also in all other columns. .TP .BR \-v , " \-\-nofsroot" Do not print a [/dir] in the SOURCE column for bind-mounts or btrfs subvolumes. .TP .BR \-w , " \-\-timeout \fImilliseconds\fP" Specify an upper limit on the time for which \fB--poll\fR will block, in milliseconds. .SH EXAMPLES .IP "\fBfindmnt \-\-fstab \-t nfs\fP" Prints all NFS filesystems defined in .IR /etc/fstab . .IP "\fBfindmnt \-\-fstab /mnt/foo\fP" Prints all .IR /etc/fstab filesystems where the mountpoint directory is /mnt/foo. It also prints bind mounts where /mnt/foo is a source. .IP "\fBfindmnt \-\-fstab --target /mnt/foo\fP" Prints all .IR /etc/fstab filesystems where the mountpoint directory is /mnt/foo. .IP "\fBfindmnt --fstab --evaluate\fP" Prints all .IR /etc/fstab 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" Monitors mount, unmount, remount and move on /mnt/foo. .IP "\fBfindmnt --poll=umount --first-only --target /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. .SH ENVIRONMENT .IP LIBMOUNT_FSTAB= overrides the default location of the fstab file .IP LIBMOUNT_MTAB= overrides the default location of the mtab file .IP LIBMOUNT_DEBUG=0xffff enables debug output .SH AUTHORS .nf Karel Zak .fi .SH SEE ALSO .BR mount (8), .BR fstab (5) .SH AVAILABILITY The findmnt command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.