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

  man pages->FreeBSD man pages -> which (1)              



NAME    [Toc]    [Back]

     which -- locate a program file in the user's path

SYNOPSIS    [Toc]    [Back]

     which [-as] [command] ...

DESCRIPTION    [Toc]    [Back]

     The which utility takes a list of command names and searches the path for
     each executable file that would be run had these commands actually been

     The following options are available:

     -a      List all instances of executables found (instead of just the
	     first one of each).

     -s      No output, just return 0 if any of the executables are found, or
	     1 if none are found.

     Some shells may provide a builtin which command which is similar or identical
 to this utility.  Consult the builtin(1) manual page.

HISTORY    [Toc]    [Back]

     The which command first appeared in FreeBSD 2.1.

SEE ALSO    [Toc]    [Back]

     builtin(1), csh(1), find(1), locate(1), whereis(1)

AUTHORS    [Toc]    [Back]

     The which utility was originally written in Perl and was contributed by
     Wolfram Schneider <wosch@FreeBSD.org>.  The current version of which was
     rewritten in C by Daniel Papasian <dpapasia@andrew.cmu.edu>.

FreeBSD 5.2.1			 June 21, 2002			 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
which OpenBSD locate a program file (or files) in the path
which IRIX locate a program file including aliases and path (csh only)
which HP-UX locate a program file including aliases and paths
whereis HP-UX locate source, binary, and/or manual for program
whereis IRIX locate source, binary, and or manual for program
SSL_CTX_set_def_verify_paths Tru64 Sets default file path and file name of trusted CA certificate
devnm HP-UX map device ID to file path
tag2name Tru64 Display the path name of an AdvFS file
acl_set_file Tru64 Sets the ACL on the file or directory designated by the path name
basename Tru64 Returns the base file name or directory portion of a path name
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service