460 lines
12 KiB
HTML
460 lines
12 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of FINDMNT</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>FINDMNT</H1>
|
|
Section: System Administration (8)<BR>Updated: May 2018<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
findmnt - find a filesystem
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>findmnt</B>
|
|
|
|
[options]
|
|
<P>
|
|
<B>findmnt</B>
|
|
|
|
[options]
|
|
<I>device</I>|<I>mountpoint</I>
|
|
|
|
<P>
|
|
<B>findmnt</B>
|
|
|
|
[options]
|
|
[<B>--source</B>]
|
|
|
|
<I>device</I>
|
|
|
|
[<B>--target</B>|<B>--mountpoint</B>]
|
|
|
|
<I>mountpoint</I>
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<B>findmnt</B>
|
|
|
|
will list all mounted filesystems or search for a filesystem. The
|
|
<B>findmnt</B>
|
|
|
|
command is able to search in
|
|
<I>/etc/fstab</I>,
|
|
|
|
<I>/etc/mtab</I>
|
|
|
|
or
|
|
<I>/proc/self/mountinfo</I>.
|
|
|
|
If
|
|
<I>device</I>
|
|
|
|
or
|
|
<I>mountpoint</I>
|
|
|
|
is not given, all filesystems are shown.
|
|
<P>
|
|
|
|
The device may be specified by device name, major:minor numbers,
|
|
filesystem label or UUID, or partition label or UUID. Note that
|
|
<B>findmnt</B>
|
|
|
|
follows
|
|
<B><A HREF="/cgi-bin/man/man2html?8+mount">mount</A></B>(8)
|
|
|
|
behavior where a device name may be interpreted
|
|
as a mountpoint (and vice versa) if the <B>--target</B>, <B>--mountpoint</B> or
|
|
<B>--source</B> options are not specified.
|
|
<P>
|
|
|
|
The command prints all mounted filesystems in the tree-like format by default.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1"><B>-A</B>,<B> --all</B>
|
|
|
|
<DD>
|
|
Disable all built-in filters and print all filesystems.
|
|
<DT id="2"><B>-a</B>,<B> --ascii</B>
|
|
|
|
<DD>
|
|
Use ascii characters for tree formatting.
|
|
<DT id="3"><B>-b</B>,<B> --bytes</B>
|
|
|
|
<DD>
|
|
Print the SIZE, USED and AVAIL columns in bytes rather than in a human-readable format.
|
|
<DT id="4"><B>-C</B>,<B> --nocanonicalize</B>
|
|
|
|
<DD>
|
|
Do not canonicalize paths at all. This option affects the comparing of paths
|
|
and the evaluation of tags (LABEL, UUID, etc.).
|
|
<DT id="5"><B>-c</B>,<B> --canonicalize</B>
|
|
|
|
<DD>
|
|
Canonicalize all printed paths.
|
|
<DT id="6"><B>-D</B>,<B> --df</B>
|
|
|
|
<DD>
|
|
Imitate the output of
|
|
<B><A HREF="/cgi-bin/man/man2html?1+df">df</A></B>(1).
|
|
|
|
This option is equivalent to
|
|
<B>-o SOURCE,FSTYPE,SIZE,USED,AVAIL,USE%,TARGET</B>
|
|
|
|
but excludes all pseudo filesystems.
|
|
Use <B>--all</B> to print all filesystems.
|
|
<DT id="7"><B>-d</B>,<B> --direction </B><I>word</I>
|
|
|
|
<DD>
|
|
The search direction, either
|
|
<B>forward</B>
|
|
|
|
or
|
|
<B>backward</B>.
|
|
|
|
<DT id="8"><B>-e</B>,<B> --evaluate</B>
|
|
|
|
<DD>
|
|
Convert all tags (LABEL, UUID, PARTUUID or PARTLABEL) to the corresponding device names.
|
|
<DT id="9"><B>-F</B>,<B> --tab-file </B><I>path</I>
|
|
|
|
<DD>
|
|
Search in an alternative file. If used with <B>--fstab</B>, <B>--mtab</B>
|
|
or <B>--kernel</B>, then it overrides the default paths. If specified more
|
|
than once, then tree-like output is disabled (see the <B>--list</B> option).
|
|
<DT id="10"><B>-f</B>,<B> --first-only</B>
|
|
|
|
<DD>
|
|
Print the first matching filesystem only.
|
|
<DT id="11"><B>-h</B>,<B> --help</B>
|
|
|
|
<DD>
|
|
Display help text and exit.
|
|
<DT id="12"><B>-i</B>,<B> --invert</B>
|
|
|
|
<DD>
|
|
Invert the sense of matching.
|
|
<DT id="13"><B>-J</B>,<B> --json</B>
|
|
|
|
<DD>
|
|
Use JSON output format.
|
|
<DT id="14"><B>-k</B>,<B> --kernel</B>
|
|
|
|
<DD>
|
|
Search in
|
|
<I>/proc/self/mountinfo</I>.
|
|
|
|
The output is in the tree-like format. This is the default. The output
|
|
contains only mount options maintained by kernel (see also <B>--mtab)</B>.
|
|
<DT id="15"><B>-l</B>,<B> --list</B>
|
|
|
|
<DD>
|
|
Use the list output format. This output format is automatically enabled if the
|
|
output is restricted by the <B>-t</B>, <B>-O</B>, <B>-S</B> or <B>-T</B>
|
|
option and the option <B>--submounts</B> is not used or if more that one
|
|
source file (the option <B>-F</B>) is specified.
|
|
<DT id="16"><B>-M</B>,<B> --mountpoint </B><I>path</I>
|
|
|
|
<DD>
|
|
Explicitly define the mountpoint file or directory. See also <B>--target</B>.
|
|
<DT id="17"><B>-m</B>,<B> --mtab</B>
|
|
|
|
<DD>
|
|
Search in
|
|
<I>/etc/mtab</I>.
|
|
|
|
The output is in the list format by default (see <B>--tree</B>). The output may include user
|
|
space mount options.
|
|
<DT id="18"><B>-N</B>,<B> --task </B><I>tid</I>
|
|
|
|
<DD>
|
|
Use alternative namespace /proc/<tid>/mountinfo rather than the default
|
|
/proc/self/mountinfo. If the option is specified more than once, then
|
|
tree-like output is disabled (see the <B>--list</B> option). See also the
|
|
<B><A HREF="/cgi-bin/man/man2html?1+unshare">unshare</A></B>(1)
|
|
|
|
command.
|
|
<DT id="19"><B>-n</B>,<B> --noheadings</B>
|
|
|
|
<DD>
|
|
Do not print a header line.
|
|
<DT id="20"><B>-O</B>,<B> --options </B><I>list</I>
|
|
|
|
<DD>
|
|
Limit the set of printed filesystems. More than one option
|
|
may be specified in a comma-separated list. The
|
|
<B>-t</B>
|
|
|
|
and
|
|
<B>-O</B>
|
|
|
|
options are cumulative in effect. It is different from
|
|
<B>-t</B>
|
|
|
|
in that each option is matched exactly; a leading
|
|
<I>no</I>
|
|
|
|
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.
|
|
<DT id="21"><B>-o</B>,<B> --output </B><I>list</I>
|
|
|
|
<DD>
|
|
Define output columns. See the <B>--help</B> output to get a list of the
|
|
currently supported columns. The
|
|
<B>TARGET</B>
|
|
|
|
column contains tree formatting if the
|
|
<B>--list</B>
|
|
|
|
or
|
|
<B>--raw</B>
|
|
|
|
options are not specified.
|
|
<P>
|
|
The default list of columns may be extended if <I>list</I> is
|
|
specified in the format <I>+list</I> (e.g. <B>findmnt -o +PROPAGATION</B>).
|
|
<DT id="22"><B>--output-all</B>
|
|
|
|
<DD>
|
|
Output almost all available columns. The columns that require
|
|
<B>--poll</B>
|
|
|
|
are not included.
|
|
<DT id="23"><B>-P</B>,<B> --pairs</B>
|
|
|
|
<DD>
|
|
Use key="value" output format. All potentially unsafe characters are hex-escaped (\x<code>).
|
|
<DT id="24"><B>-p</B>,<B> --poll</B>[<I>=list</I>]
|
|
|
|
<DD>
|
|
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.
|
|
<P>
|
|
The time for which <B>--poll</B> will block can be restricted with the <B>--timeout</B>
|
|
or <B>--first-only</B> options.
|
|
<P>
|
|
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
|
|
<B><A HREF="/cgi-bin/man/man2html?8+findmnt">findmnt</A></B>(8).
|
|
|
|
The poll mode allows to use extra columns:
|
|
<DL COMPACT><DT id="25"><DD>
|
|
<DL COMPACT>
|
|
<DT id="26"><B>ACTION</B>
|
|
|
|
<DD>
|
|
mount, umount, move or remount action name; this column is enabled by default
|
|
<DT id="27"><B>OLD-TARGET</B>
|
|
|
|
<DD>
|
|
available for umount and move actions
|
|
<DT id="28"><B>OLD-OPTIONS</B>
|
|
|
|
<DD>
|
|
available for umount and remount actions
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="29"><B>--pseudo</B>
|
|
|
|
<DD>
|
|
Print only pseudo filesystems.
|
|
<DT id="30"><B>-R</B>,<B> --submounts</B>
|
|
|
|
<DD>
|
|
Print recursively all submounts for the selected filesystems. The restrictions
|
|
defined by options <B>-t</B>, <B>-O</B>, <B>-S</B>, <B>-T</B> and
|
|
<B>--direction</B> 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 <B>--mtab</B> or <B>--fstab</B>.
|
|
<DT id="31"><B>-r</B>,<B> --raw</B>
|
|
|
|
<DD>
|
|
Use raw output format. All potentially unsafe characters are hex-escaped (\x<code>).
|
|
<DT id="32"><B>--real</B>
|
|
|
|
<DD>
|
|
Print only real filesystems.
|
|
<DT id="33"><B>-S</B>,<B> --source </B><I>spec</I>
|
|
|
|
<DD>
|
|
Explicitly define the mount source. Supported specifications are <I>device</I>,
|
|
<I>maj</I><B>:</B><I>min</I>, <B>LABEL=</B><I>label</I>, <B>UUID=</B><I>uuid</I>,
|
|
<B>PARTLABEL=</B><I>label</I> and <B>PARTUUID=</B><I>uuid</I>.
|
|
<DT id="34"><B>-s</B>,<B> --fstab</B>
|
|
|
|
<DD>
|
|
Search in
|
|
<I>/etc/fstab</I>.
|
|
|
|
The output is in the list format (see <B>--list</B>).
|
|
<DT id="35"><B>-T</B>,<B> --target </B><I>path</I>
|
|
|
|
<DD>
|
|
Define the mount target. If <I>path</I>
|
|
is not a mountpoint file or directory, then
|
|
<B>findmnt</B>
|
|
|
|
checks the <I>path</I> elements in reverse order to get the mountpoint (this feature is
|
|
supported only when searching in kernel files and unsupported for <B>--fstab</B>). It's
|
|
recommended to use the option <B>--mountpoint</B> when checks of <I>path</I> elements are
|
|
unwanted and <I>path</I> is a strictly specified mountpoint.
|
|
<DT id="36"><B>-t</B>,<B> --types </B><I>list</I>
|
|
|
|
<DD>
|
|
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
|
|
<B>no</B>
|
|
|
|
to specify the filesystem types on which no action should be taken. For
|
|
more details see
|
|
<B><A HREF="/cgi-bin/man/man2html?8+mount">mount</A></B>(8).
|
|
|
|
<DT id="37"><B>--tree</B>
|
|
|
|
<DD>
|
|
Enable tree-like output if possible. The options is silently ignored for
|
|
tables where is missing child-parent relation (e.g. fstab).
|
|
<DT id="38"><B>-U</B>,<B> --uniq</B>
|
|
|
|
<DD>
|
|
Ignore filesystems with duplicate mount targets, thus effectively skipping
|
|
over-mounted mount points.
|
|
<DT id="39"><B>-u</B>,<B> --notruncate</B>
|
|
|
|
<DD>
|
|
Do not truncate text in columns. The default is to not truncate the
|
|
<B>TARGET</B>,
|
|
|
|
<B>SOURCE</B>,
|
|
|
|
<B>UUID</B>,
|
|
|
|
<B>LABEL</B>,
|
|
|
|
<B>PARTUUID</B>,
|
|
|
|
<B>PARTLABEL</B>
|
|
|
|
columns. This option disables text truncation also in all other columns.
|
|
<DT id="40"><B>-v</B>,<B> --nofsroot</B>
|
|
|
|
<DD>
|
|
Do not print a [/dir] in the SOURCE column for bind mounts or btrfs subvolumes.
|
|
<DT id="41"><B>-w</B>,<B> --timeout </B><I>milliseconds</I>
|
|
|
|
<DD>
|
|
Specify an upper limit on the time for which <B>--poll</B> will block, in milliseconds.
|
|
<DT id="42"><B>-x</B>,<B> --verify</B>
|
|
|
|
<DD>
|
|
Check mount table content. The default is to verify
|
|
<I>/etc/fstab</I>
|
|
|
|
parsability and usability. It's possible to use this option also with <B>--tab-file</B>.
|
|
It's possible to specify source (device) or target (mountpoint) to filter mount table. The option
|
|
<B>--verbose</B> forces findmnt to print more details.
|
|
<DT id="43"><B>--verbose</B>
|
|
|
|
<DD>
|
|
Force findmnt to print more information (<B>--verify</B> only for now).
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>EXAMPLES</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="44"><B>findmnt --fstab -t nfs</B><DD>
|
|
Prints all NFS filesystems defined in
|
|
<I>/etc/fstab</I>.
|
|
|
|
<DT id="45"><B>findmnt --fstab /mnt/foo</B><DD>
|
|
Prints all
|
|
<I>/etc/fstab</I>
|
|
|
|
filesystems where the mountpoint directory is /mnt/foo. It also prints bind mounts where /mnt/foo
|
|
is a source.
|
|
<DT id="46"><B>findmnt --fstab --target /mnt/foo</B><DD>
|
|
Prints all
|
|
<I>/etc/fstab</I>
|
|
|
|
filesystems where the mountpoint directory is /mnt/foo.
|
|
<DT id="47"><B>findmnt --fstab --evaluate</B><DD>
|
|
Prints all
|
|
<I>/etc/fstab</I>
|
|
|
|
filesystems and converts LABEL= and UUID= tags to the real device names.
|
|
<DT id="48"><B>findmnt -n --raw --evaluate --output=target LABEL=/boot</B><DD>
|
|
Prints only the mountpoint where the filesystem with label "/boot" is mounted.
|
|
<DT id="49"><B>findmnt --poll --mountpoint /mnt/foo</B><DD>
|
|
Monitors mount, unmount, remount and move on /mnt/foo.
|
|
<DT id="50"><B>findmnt --poll=umount --first-only --mountpoint /mnt/foo</B><DD>
|
|
Waits for /mnt/foo unmount.
|
|
<DT id="51"><B>findmnt --poll=remount -t ext3 -O ro</B><DD>
|
|
Monitors remounts to read-only mode on all ext3 filesystems.
|
|
</DL>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>ENVIRONMENT</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="52">LIBMOUNT_FSTAB=<path><DD>
|
|
overrides the default location of the fstab file
|
|
<DT id="53">LIBMOUNT_MTAB=<path><DD>
|
|
overrides the default location of the mtab file
|
|
<DT id="54">LIBMOUNT_DEBUG=all<DD>
|
|
enables libmount debug output
|
|
<DT id="55">LIBSMARTCOLS_DEBUG=all<DD>
|
|
enables libsmartcols debug output
|
|
<DT id="56">LIBSMARTCOLS_DEBUG_PADDING=on<DD>
|
|
use visible padding characters. Requires enabled LIBSMARTCOLS_DEBUG.
|
|
</DL>
|
|
<A NAME="lbAH"> </A>
|
|
<H2>AUTHORS</H2>
|
|
|
|
<PRE>
|
|
Karel Zak <<A HREF="mailto:kzak@redhat.com">kzak@redhat.com</A>>
|
|
</PRE>
|
|
|
|
<A NAME="lbAI"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?5+fstab">fstab</A></B>(5),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+mount">mount</A></B>(8)
|
|
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>AVAILABILITY</H2>
|
|
|
|
The findmnt command is part of the util-linux package and is available from
|
|
<A HREF="https://www.kernel.org/pub/linux/utils/util-linux/.">https://www.kernel.org/pub/linux/utils/util-linux/.</A>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="57"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="58"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="59"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="60"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="61"><A HREF="#lbAF">EXAMPLES</A><DD>
|
|
<DT id="62"><A HREF="#lbAG">ENVIRONMENT</A><DD>
|
|
<DT id="63"><A HREF="#lbAH">AUTHORS</A><DD>
|
|
<DT id="64"><A HREF="#lbAI">SEE ALSO</A><DD>
|
|
<DT id="65"><A HREF="#lbAJ">AVAILABILITY</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:12 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|