icon Top 9 categories map      RocketAware >

which(1)

Tips: Browse or Search all pages for efficient awareness of more than 6000 of the most popular reusable and open source applications, functions, libraries, and FAQs.


The "RKT couplings" below include links to source code, updates, additional information, advice, FAQs, and overviews.


Home

Search all pages


Subjects

By activity
Professions, Sciences, Humanities, Business, ...

User Interface
Text-based, GUI, Audio, Video, Keyboards, Mouse, Images,...

Text Strings
Conversions, tests, processing, manipulation,...

Math
Integer, Floating point, Matrix, Statistics, Boolean, ...

Processing
Algorithms, Memory, Process control, Debugging, ...

Stored Data
Data storage, Integrity, Encryption, Compression, ...

Communications
Networks, protocols, Interprocess, Remote, Client Server, ...

Hard World
Timing, Calendar and Clock, Audio, Video, Printer, Controls...

File System
Management, Filtering, File & Directory access, Viewers, ...

    

RocketLink!--> Man page versions: OpenBSD FreeBSD NetBSD RedHat Solaris Others



WHICH(1)                   OpenBSD Reference Manual                   WHICH(1)

NAME
     which - locate a program file (or files) in the path



SYNOPSIS
     which [-a] name [...]

DESCRIPTION
     which takes a list of names and looks for the files which would be exe-
     cuted had these names been given as commands.  Each argument is searched
     for along the user's path.

     If the -a flag is given, which will return a list of all matches instead
     of just the first match.

RETURN VALUES
     The which utility exits with one of the following values:

     0     All names were successfully resolved.
     1     Some names were resolved but not all.
     2     No names were resolved.
     -1    A system error occurred.

DIAGNOSTICS
     A diagnostic is given if an executable file with the argument name was
     not found in the path.

ENVIRONMENT
     PATH  which uses the environment variable PATH as a colon-separated list
           of directories in which to find executables.  If PATH is not set,
           and the given name is not a fully qualified or relative pathname,
           which will fail.

CAVEATS
     The which command formerly was a csh(1) script and could expand aliases.
     csh(1) now has a built-in which command so this version is intended for
     use with other shells like sh(1).

SEE ALSO
     csh(1),  find(1),  locate(1),  sh(1),  whereis(1),  environ(7)

HISTORY
     A which command appeared in 3.0BSD.

OpenBSD 2.6                    February 21, 1997                             1

Source: OpenBSD 2.6 man pages. Copyright: Portions are copyrighted by BERKELEY
SOFTWARE DESIGN, INC., The Regents of the University of California, Massachusetts
Institute of Technology, Free Software Foundation, FreeBSD Inc., and others.



(Corrections, notes, and links courtesy of RocketAware.com)


[Detailed Topics]
FreeBSD Sources for which(1)
OpenBSD sources for which(1)


[Overview Topics]

Up to: File Information - Obtaining file information (status, configuration, et al)
Up to: Directory Access - Accessing directories of files, browsing, management, et al.
Up to: Command Shells and Scripting Languages


RocketLink!--> Man page versions: OpenBSD FreeBSD NetBSD RedHat Solaris Others






Rapid-Links: Search | About | Comments | Submit Path: RocketAware > which.1/
RocketAware.com is a service of Mib Software
Copyright 1999, Forrest J. Cavalier III. All Rights Reserved.
We welcome submissions and comments