util-linux/sys-utils/mountpoint.1

72 lines
1.6 KiB
Groff

.TH MOUNTPOINT 1 "August 2019" "util-linux" "User Commands"
.SH NAME
mountpoint \- see if a directory or file is a mountpoint
.SH SYNOPSIS
.B mountpoint
.RB [ \-d | \-q ]
.I directory
|
.I file
.sp
.B mountpoint
.B \-x
.I device
.SH DESCRIPTION
.B mountpoint
checks whether the given
.I directory
or
.I file
is mentioned in the /proc/self/mountinfo file.
.SH OPTIONS
.TP
.BR \-d , " \-\-fs\-devno"
Show the major/minor numbers of the device that is mounted on the given
directory.
.TP
.BR \-q , " \-\-quiet"
Be quiet - don't print anything.
.TP
.B "\-\-nofollow"
Do not follow symbolic link if it the last element of the
.I directory
path.
.TP
.BR \-x , " \-\-devno"
Show the major/minor numbers of the given blockdevice on standard output.
.TP
.BR \-V , " \-\-version"
Display version information and exit.
.TP
.BR \-h , " \-\-help"
Display help text and exit.
.SH EXIT STATUS
.B mountpoint
has the following exit status values:
.TP
.B 0
success; the directory is a mountpoint, or device is block device on \fB\-\-devno\fR
.TP
.B 1
failure; incorrect invocation, permissions or system error
.TP
.B 32
failure; the directory is not a mountpoint, or device is not a block device on \fB\-\-devno\fR
.SH ENVIRONMENT
.IP LIBMOUNT_DEBUG=all
enables libmount debug output.
.SH NOTES
The util-linux
.B mountpoint
implementation was written from scratch for libmount. The original version
for sysvinit suite was written by Miquel van Smoorenburg.
.SH AUTHORS
Karel Zak <kzak@redhat.com>
.SH SEE ALSO
.BR mount (8)
.SH AVAILABILITY
The mountpoint command is part of the util-linux package and is available from
https://www.kernel.org/pub/linux/utils/util-linux/.