[Previous] [Contents] [Next]

which

Locate a program file (UNIX)

Syntax:

which [-aflL] program...

Options:

-a
Find all occurrences of program in PATH.
-f
Display the full QNX pathname.
-l
("el") Display long format (as in ls -lL) for each program found.
-L
Display long format (as in ls -l) for each program found, displaying link information if the file is a symlink.

Description:

The which utility searches the filesystem for each program specified. The user's current PATH environment variable is used as the search path.

Examples:

Display full pathname (includes node) and long status for all versions of the ls utility found in PATH:

    which -alf ls

Display pathname for the which utility:

    which which

Environment variables:

PATH
A colon-separated list of directories to search for QNX executables.

Exit status:

0
All input files were searched successfully.
>0
An error occurred.

See also:

sh


[Previous] [Contents] [Next]