Difference between revisions of "Shell Commands/Which"

From MorphOS Library

< Shell Commands

 
Line 1: Line 1:
 
'''Which''' - Searches the command path for a particular item
 
'''Which''' - Searches the command path for a particular item
  
FILE/A, NORES/S, RES/S, ALL/S
+
FILE/A, NOALIAS/S, ALIAS/S, NORES/S, RES/S, ALL/S
 
  <nowiki>
 
  <nowiki>
FILE - Name of the command, program or directory to find                       
+
FILE   - Name of the command, program or directory to find                       
NORES - Switch: Do no search the resident list
+
NOALIAS - Switch: Do not search the alias list
RES   - Switch: Only search the resident list
+
ALIAS  - Switch: Only search the alias list
ALL   - Continues the search through the full search path, find and list
+
NORES   - Switch: Do no search the resident list
        all locations of a command or program.
+
RES     - Switch: Only search the resident list
        May lead to multiple listings of the same command if
+
ALL     - Continues the search through the full search path, find and list
        that command is reached by more than one route
+
          all locations of a command or program.
        (such as C: and the current directory).</nowiki>
+
          May lead to multiple listings of the same command if
 +
          that command is reached by more than one route
 +
          (such as C: and the current directory).</nowiki>
  
 
Example:
 
Example:

Latest revision as of 14:26, 6 March 2015

Which - Searches the command path for a particular item

FILE/A, NOALIAS/S, ALIAS/S, NORES/S, RES/S, ALL/S

FILE    - Name of the command, program or directory to find                      
NOALIAS - Switch: Do not search the alias list
ALIAS   - Switch: Only search the alias list
NORES   - Switch: Do no search the resident list
RES     - Switch: Only search the resident list
ALL     - Continues the search through the full search path, find and list
          all locations of a command or program.
          May lead to multiple listings of the same command if
          that command is reached by more than one route
          (such as C: and the current directory).

Example:

  MorphOS:> Which devlist
  MorphOS:MorphOS/C/DevList