Article View: aus.computers.linux
Article #47864Re: newbie question : why won't some programs execute ?
From: Cameron Hutchison
Date: Sun, 27 Dec 1998 00:00
Date: Sun, 27 Dec 1998 00:00
35 lines
1379 bytes
1379 bytes
pclyne@idx.com.au (Paul Clyne) writes:
> One more question though. How do you remember if a file is in
>your path or not ?. Is it just expirence that lets you remember or do
>you use extensive use of the find command ?.
You can use the 'which' command to find out if a program is in your path.
eg.
$ which rm
/bin/rm
$ which foo
$
If you are using the bash shell (echo $SHELL), you can use the 'type'
builtin command. This will also tell you if a command is an alias, shell
function or a builtin shell function (other stuff too probably).
$ type rm
rm is /bin/rm
$ type gv
gv is aliased to `ghostview'
$ type l
l is a function
l ()
{
ls -l $*
}
$ type foo
bash: type: foo: not found
$
CHeers
--
Cameron Hutchison (camh@zip.net.au) | Onward To Mars
GCS d--@ -p+ c++(++++) l++ u+ e+ m+(-) s n- h++ f? !g w+ t r+
Technical Details
Message-ID:
<766gqj$4rp$1@the-fly.zip.com.au>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<MPG.10ee1412cad847ce989689@news.idx.com.au> <MPG.10eff673461c964b98968a@news.idx.com.au>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 102983,e0d3895f785fdf88 X-Google-Attributes: gid102983,public From: Cameron Hutchison <camh@zip.net.au> Subject: Re: newbie question : why won't some programs execute ? Date: 1998/12/27 Message-ID: <766gqj$4rp$1@the-fly.zip.com.au> X-Deja-AN: 426280000 References: <MPG.10ee1412cad847ce989689@news.idx.com.au> <MPG.10eff673461c964b98968a@news.idx.com.au> Organization: The Zipsters Newsgroups: aus.computers.linux Originator: camh@zipper.zip.com.au