Unix/Linux Go Back    

OpenSolaris 2009.06 - man page for which (opensolaris section 1)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)

which(1)				  User Commands 				 which(1)

       which - locate a command and display its pathname or alias

       which [name]...

       which  takes  a	list of names and determines which alias or utility would be executed had
       these names been given as commands.

       For each name operand, if it names an alias the alias is expanded.  Otherwise  the  user's
       path  is  searched  for	a  utility name matching name.	Aliases are taken from the user's
       .cshrc file. path is taken from the current shell   execution environment.

       The following operand is supported:

       name    The name of a command to be located.

       The following exit values are returned:

       0      Successful completion.

       >0     One or more name operands were not located or an error occurred.

       ~/.cshrc    source of aliases and path values

       See attributes(5) for descriptions of the following attributes:

       |      ATTRIBUTE TYPE	     |	    ATTRIBUTE VALUE	   |
       |Availability		     |SUNWcsu			   |

       csh(1), attributes(5)

       A diagnostic is given for names which are aliased to more than a single	word,  or  if  an
       executable file with the argument name was not found in the path.

       The which utility is not a shell built-in command.

       To  compensate  for  ~/.cshrc files in which aliases depend upon the prompt variable being
       set, which sets this variable to NULL. If the ~/.cshrc  produces  output  or  prompts  for
       input when prompt is set, which can produce some strange results.

SunOS 5.11				   30 Mar 2005					 which(1)
Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums

All times are GMT -4. The time now is 10:16 AM.