]> git.ipfire.org Git - thirdparty/util-linux.git/blob - sys-utils/mountpoint.1
libmount: make mnt_context_is_fs_mounted work for /proc
[thirdparty/util-linux.git] / sys-utils / mountpoint.1
1 .TH MOUNTPOINT 1 "July 2014" "util-linux" "User Commands"
2 .SH NAME
3 mountpoint \- see if a directory or file is a mountpoint
4 .SH SYNOPSIS
5 .B mountpoint
6 .RB [ \-d | \-q ]
7 .I directory
8 |
9 .I file
10 .sp
11 .B mountpoint
12 .B \-x
13 .I device
14
15 .SH DESCRIPTION
16 .B mountpoint
17 checks whether the given
18 .I directory
19 or
20 .I file
21 is mentioned in the /proc/self/mountinfo file.
22 .SH OPTIONS
23 .TP
24 .BR \-d , " \-\-fs\-devno"
25 Show the major/minor numbers of the device that is mounted on the given
26 directory.
27 .TP
28 .BR \-q , " \-\-quiet"
29 Be quiet - don't print anything.
30 .TP
31 .BR \-x , " \-\-devno"
32 Show the major/minor numbers of the given blockdevice on standard output.
33 .TP
34 .BR \-V , " \-\-version"
35 Display version information and exit.
36 .TP
37 .BR \-h , " \-\-help"
38 Display help text and exit.
39 .SH EXIT STATUS
40 Zero if the directory or file is a mountpoint, non-zero if not.
41 .SH AUTHOR
42 .PP
43 Karel Zak <kzak@redhat.com>
44 .SH ENVIRONMENT
45 .IP LIBMOUNT_DEBUG=all
46 enables libmount debug output.
47 .SH NOTES
48 .PP
49 The util-linux
50 .B mountpoint
51 implementation was written from scratch for libmount. The original version
52 for sysvinit suite was written by Miquel van Smoorenburg.
53
54 .SH SEE ALSO
55 .BR mount (8)
56 .SH AVAILABILITY
57 The mountpoint command is part of the util-linux package and is available from
58 https://www.kernel.org/pub/linux/utils/util-linux/.