mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-24 14:31:05 +00:00
45 lines
1.1 KiB
Plaintext
45 lines
1.1 KiB
Plaintext
TITLE
|
|
A2osX which (bin/which) Command Help
|
|
|
|
which -- locate a program file in the user's path
|
|
|
|
SYNOPSIS
|
|
which program ...
|
|
|
|
DESCRIPTION
|
|
The which utility takes a list of command names and searches the path for
|
|
each and will report back which specific executable would have been picked
|
|
up if the command was actually run.
|
|
|
|
The which utility accepts the following options:
|
|
|
|
-a List all instances found instead of just the first one.
|
|
|
|
-s No output, just return 0 if all programs are found, or 1 if
|
|
some were not found.
|
|
|
|
PAGE
|
|
EXAMPLES
|
|
Locate the cp and ls commands:
|
|
|
|
# which cp ls
|
|
/FULL32/bin/cp
|
|
/FULL32/bin/ls
|
|
|
|
Do not show output, just return code:
|
|
|
|
# which -s seq
|
|
# echo $?
|
|
0
|
|
|
|
# which -s fakecmd
|
|
# echo $?
|
|
1
|
|
|
|
|
|
HISTORY
|
|
The which command first appeared in FreeBSD 2.1 and was a Perl script
|
|
written by Wolfram Schneider <wosch@FreeBSD.org>. The A2osX which command
|
|
was developed by Brian J. Bernstein <brian@dronefone.com> in Dec 2022.
|
|
|