minix/man/man1/which.1

35 lines
764 B
Groff
Raw Normal View History

2005-05-02 15:01:42 +02:00
.TH WHICH 1
.SH NAME
which \- examine $PATH to see which file will be executed
.SH SYNOPSIS
\fBwhich \fIname\fR
.br
.de FL
.TP
\\fB\\$1\\fR
\\$2
..
.de EX
.TP 20
\\fB\\$1\\fR
# \\$2
..
.SH EXAMPLES
2012-03-31 23:44:29 +02:00
.TP 20
.B which a.out
# Tells which \fIa.out\fR will be executed
2005-05-02 15:01:42 +02:00
.SH DESCRIPTION
.PP
The $PATH shell variable controls the
\s-1MINIX 3\s-1
2005-05-02 15:01:42 +02:00
search rules.
If a command \fIa.out\fR is given, the shell first tries to find an
executable file in the working directory.
If that fails, it looks in various system directories, such as
\fI/bin\fR and \fI/usr/bin\fR.
The\fR which\fR command makes the same search and gives the absolute
path of the program that will be chosen, followed by other occurrences
of the file name along the path.
.SH "SEE ALSO"
.BR man (1).