Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/w/which.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/w/which.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/w/which.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/w/which.html on line 8

which

Locate a program file (UNIX)

Syntax:

which [-afLls] program...

Runs on:

Neutrino

Options:

-a
Find all occurrences of program in PATH.
-f
Display the full pathname.
-L
Display the long format (as in ls -l) for each program found, displaying link information if the file is a symlink.
-l
(“el”) Display the long format (as in ls -l) for each program found.
-s
Search for shared objects in the directories identified by the LD_LIBRARY_PATH environment variable and the _CS_LIBPATH configuration string.

Description:

The which utility searches for the specified programs. By default, which searches the directories listed by your PATH environment variable, but if you specify the -s option, it searches the directories specified by LD_LIBRARY_PATH and _CS_LIBPATH.

Examples:

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

which -alf ls

Display the pathname for the which utility:

which which

Locate the devg-flat.so shared object:

which -s devg-flat.so

Environment variables:

PATH
A colon-separated list of directories to search for executables.
LD_LIBRARY_PATH
A colon-separated list of directories to search for shared libraries.

Exit status:

0
All input files were found.
>0
An error occurred.

See also:

ls, whence (builtin ksh command)


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/w/which.html on line 167

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/w/which.html on line 167