]> git.ipfire.org Git - thirdparty/util-linux.git/blob - misc-utils/findmnt.8
rename util-linux-ng back to util-linux
[thirdparty/util-linux.git] / misc-utils / findmnt.8
1 .\" -*- nroff -*-
2 .TH FINDMNT 8 "Apr 2010" "Version 1.0"
3 .SH NAME
4 findmnt \- find a filesystem
5 .SH SYNOPSIS
6 .B findmnt
7 .RB [ options ]
8 .sp
9 .B findmnt
10 .RB [ options ]
11 .IR device | mountpoint
12 .sp
13 .B findmnt
14 .RB [ options ]
15 .RB [ \--source ]
16 .IR device
17 .RB [ \--target ]
18 .IR mountpoint
19 .SH DESCRIPTION
20 .B findmnt
21 will list all mounted filesytems or search for a filesystem. The
22 .B findmnt
23 command is able to search in
24 .IR /etc/fstab ,
25 .IR /etc/mtab
26 or
27 .IR /proc/self/mountinfo .
28 If
29 .IR device
30 or
31 .IR mountpoint
32 is not given, all filesystems are shown.
33 .PP
34 The command prints all mounted filesystems in the tree-like format by default.
35 .SH OPTIONS
36 .IP "\fB\-h, \-\-help\fP"
37 Print help and exit.
38 .IP "\fB\-s, \-\-fstab\fP"
39 Search in
40 .IR /etc/fstab .
41 The output is in the list format (see --list).
42 .IP "\fB\-m, \-\-mtab\fP"
43 Search in
44 .IR /etc/mtab .
45 The output is in the list format (see --list).
46 .IP "\fB\-k, \-\-kernel\fP"
47 Search in
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 -
54 .IR forward
55 or
56 .IR backward .
57 .IP "\fB\-e, \-\-evaluate\fP"
58 Convert all tags (LABEL or UUID) to the device names.
59 .IP "\fB\-f, \-\-first-only\fP"
60 Print the first matching filesystem only.
61 .IP "\fB\-i, \-\-invert\fP"
62 Invert the sense of matching.
63 .IP "\fB\-l, \-\-list\fP"
64 Use the list output format.
65 .IP "\fB\-n, \-\-noheadings\fP"
66 Do not print a header line.
67 .IP "\fB\-u, \-\-notruncate\fP"
68 Do not truncate text in columns. The default is to not truncate the
69 .BR TARGET ,
70 .BR SOURCE ,
71 .BR UUID
72 and
73 .BR LABEL
74 columns. This option disables text truncation also in all other columns.
75 .IP "\fB\-O, \-\-options \fIlist\fP"
76 Used to limit the set of printed filesystems. More than one option
77 may be specified in a comma-separated list. The
78 .B \-t
79 and
80 .B \-O
81 options are cumulative in effect. It is different from
82 .B \-t
83 in that each option is matched exactly; a leading
84 .I no
85 at the beginning
86 of one option does not negate the rest. For more details see
87 .BR mount (8).
88 .IP "\fB\-o, \-\-output \fIlist\fP"
89 Define output columns. Currently supported are
90 .BR SOURCE ,
91 .BR TARGET ,
92 .BR FSTYPE ,
93 .BR OPTIONS ,
94 .BR VFS-OPTIONS ,
95 .BR FS-OPTIONS ,
96 .BR LABEL
97 and
98 .BR UUID .
99 The
100 .BR TARGET
101 column contains tree formatting if the
102 .B \-\-list
103 or
104 .B \-\-raw
105 options are not specified.
106 .IP "\fB\-r, \-\-raw\fP"
107 Use raw output format.
108 .IP "\fB\-a, \-\-ascii\fP"
109 Use ascii characters for tree formatting.
110 .IP "\fB\-t, \-\-types \fIlist\fP"
111 Used to limit the set of printed filesystems. More than one type may be
112 specified in a comma-separated list. The list of filesystem types can be
113 prefixed with
114 .I no
115 to specify the filesystem types on which no action should be taken. For
116 more details see
117 .BR mount (8).
118 .IP "\fB\-S, \-\-source \fIspec\fP"
119 Explicitly define the mount source. Supported are device, LABEL= or UUID=.
120 .IP "\fB\-T, \-\-target \fIdir\fP"
121 Explicitly define the mount target (mountpoint directory).
122 .SH EXAMPLES
123 .IP "\fBfindmnt \-\-fstab \-t nfs\fP"
124 Prints all nfs filesystems defined in
125 .IR /etc/fstab .
126 .IP "\fBfindmnt \-\-fstab /mnt/foo\fP"
127 Prints all
128 .IR /etc/fstab
129 filesystems where the mountpoint directory is /mnt/foo. It also prints bind mounts where /mnt/foo
130 is a source.
131 .IP "\fBfindmnt \-\-fstab --target /mnt/foo\fP"
132 Prints all
133 .IR /etc/fstab
134 filesystems where the mountpoint directory is /mnt/foo.
135 .IP "\fBfindmnt --fstab --evaluate\fP"
136 Prints all
137 .IR /etc/fstab
138 filesystems and converts LABEL= and UUID= tags to the real device names.
139 .IP "\fBfindmnt -n --raw --evaluate --output=target LABEL=/boot
140 Prints only the mountpoint where the filesystem with label "/boot" is mounted.
141 .SH AUTHORS
142 .nf
143 Karel Zak <kzak@redhat.com>
144 .fi
145 .SH SEE ALSO
146 .BR mount (8),
147 .BR fstab (5)
148 .SH AVAILABILITY
149 The findmnt command is part of the util-linux package and is available from
150 ftp://ftp.kernel.org/pub/linux/utils/util-linux/.