Which: A Program to Locate Which Version of a Program (or File) is Being Used
Original Publication Date: 1991-Jun-01
Included in the Prior Art Database: 2005-Apr-02
While working and developing code on OS/2* it is common to not know where a particular file is located (.EXE file, Include file, library file, etc.,). A search of the disk can be done, but there may be more than one file with a given name. WHICH will tell you "which" one is used.
Which: A Program to Locate Which Version of a Program (or
and developing code on OS/2* it is common
to not know where a particular file is located (.EXE file, Include
file, library file, etc.,). A search of the disk can be done, but
there may be more than one file with a given name. WHICH will tell
you "which" one is used.
WHICH is a
program that exists as part of the standard UNIX**
operating system. It did not, however, exist on OS/2. A program has
been created with the functionality of WHICH on UNIX, and the program
has been greatly expanded with many new and useful functions.
WHICH on UNIX
will only perform the WHICH function for
executable programs or command files. This version of WHICH does
this and also allows you to search for any file extension along any
path or environment. Also built into WHICH is the capability to know
the more common file types for a C programmer (such as .LIB, .H and
.DLL) so that WHICH knows the proper environment to search for those
file types. WHICH also operates in DOS mode (it knows about DOS
What follows is the documentation for WHICH:
WHICH OS/2 USERS MANUAL WHICH
WHICH -- A program to locate WHICH version of a program
(or file) is being used.
Where (adehi) = are options you may choose to
Where <fname> = file name you would type at the
Where (.ext) = an optional file extension.
WHICH is a
utility to inform you of the copy of a file that
would be accessed from your current directory. The most common usage
of WHICH is to locate the executable file that would be run if you
were to type <fname> at the OS/2 prompt. WHICH searches along the
path (starting with the current directory) for the first program (or
command file) that would be executed.
particularly useful when you have several programs
with the same name in different directories. WHICH will tell you
which one would be run.
directory WHICH checks to see if an executable file
exists. WHICH checks for COM, EXE and CMD files (in that order).
You may explicitly include the extension (such as ".EXE"). In this
case, WHICH will only search the path for the filename.EXE.
WHICH can also search for common OS/2 file types
using the proper environment variables for the search path. All you
need to do is to invoke WHICH with the proper file name (including
the extension). WHICH will then search for the file name using the
proper environment variable instead...