*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> which (1)              


 which(1)                                                           which(1)

 NAME    [Toc]    [Back]
      which - locate a program file including aliases and paths

 SYNOPSIS    [Toc]    [Back]
      which [name ...]

 DESCRIPTION    [Toc]    [Back]
      For each name given, which searches for the file that would be
      executed if name were given as a command, and displays the absolute
      path of that file.  Each argument is expanded if it is aliased, and
      searched for along the user's path.  Both aliases and path are
      determined by sourcing (executing) the user's .cshrc file.

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

 EXAMPLES    [Toc]    [Back]
      The command:

           which sh

      specifies where the executable program of the sh(1) command is found.
      For example, the response might be:


      if the sh(1) being used is located in /usr/bin.

 WARNINGS    [Toc]    [Back]
      which reports .cshrc aliases even when not invoked from csh.

      which cannot find csh built-in commands (e.g. jobs).

      which's information may be incorrect because it is unaware of any path
      or alias changes that have occurred in the current shell session.

 AUTHOR    [Toc]    [Back]
      which was developed by the University of California, Berkeley.

 FILES    [Toc]    [Back]
      ~/.cshrc       source of aliases and path values

 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003
[ Back ]
 Similar pages
Name OS Title
which Tru64 Locates a program file including aliases and paths
which IRIX locate a program file including aliases and path (csh only)
which FreeBSD locate a program file in the user's path
which OpenBSD locate a program file (or files) in the path
whereis IRIX locate source, binary, and or manual for program
whereis HP-UX locate source, binary, and/or manual for program
ftpd Tru64 The File Transfer Protocol server daemon, including anonymous service
aliases IRIX aliases file for sendmail
aliases OpenBSD aliases file for sendmail
aliases HP-UX aliases file for sendmail
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service