UNIX Guide, for beginners and Mac OS X users
You are here: SillyDog701 > UNIX Guide >SillyDog701 > UNIX Guide > Command > supportSupport - ask in our friendly forums.

Examples of locating commands with the which command

To find out if a command name is located in your command path:

   which ue
   /usr/local/bin/ue

This returns the information that the MicroEMACS editor (ue) is available on this system as the file /usr/local/bin/ue.

To find out if the Korn shell is available on your system:

   which ksh
   /bin/ksh

This returns the information that the Korn shell is available on your system in the directory /bin.

To find out which (if any) of several commands are available:

   which delete talk ps
   No delete in /usr/local/utils/bin:/bin:/usr/bin:
   /usr/local/ucb/bin:/usr/local/gnu/bin:
   /usr/local/public/bin:/usr/bin/X11:.
   /usr/bin/talk
   /bin/ps

This returns the information that the file for the command delete does not exist in any of the directories that are specified in this user's PATH environment variable.

Pathnames for the files of the commands talk and ps are displayed, so these commands are available on this system.


[Home]UNIX Guide home | [Search]search | index
Page URL: http://sillydog.org/unix/
[SillyDog701] [Netscape] [MozInfo701] [MacCentre701] [UNIX Guide] [AntTunes701][Forums] [Search] [Change Log] [Feedback] [About Us] [Sitemap]
This UNIX Guide maintained by SillyDog701, portion of this Guide is based on UNIXhelp. UNIXhelp is copyright University of Edinburgh. This page was last modified on 14 March, 2006
Netscape NOW!Made on a Mac
support MozInfo701 and SillyDog701