Search:
+subject: which - show full path of commands

WHICH(1)                                                 WHICH(1)



NAME
       which - show full path of commands

SYNOPSIS
       which [options] progname ...

DESCRIPTION
       which prints the full pathname for each progname.  It does
       this by looking in every directory found in the PATH envi-
       ronment variable.

       In  contrast  to  the  standard which command this version
       prints any occurence of  progname.   Furthermore  progname
       may contain the shell wildcard ``?''  and ``*''.

OPTIONS
       The following options are mutually exclusive.

       -e     don't print anything, just return an exit code.

       -l     do an ``ls -l'' for each occurence of progname.

       -s     print only the first occurence.

EXAMPLES
       The following does what the usual which command also does,

            which -s ls

       it prints the location of the ls command.

            which ls

       looks for the ls command in every PATH directory.

            which 'ls*'

       lists all command starting with ``ls''.

            which '*'

       lists all available commands.

NOTES
       which is an akanga(1) shell script.  If  you  are  working
       with  bash(1) you'll perhaps to disable the which alias in
       /etc/profile.



                           16 May 1999                   WHICH(1)