[SunRescue] Locate for Solaris ??

Rich Lafferty rescue at sunhelp.org
Sat May 19 01:37:21 CDT 2001


On Sat, May 19, 2001 at 12:13:59AM -0400, Dave McGuire (mcguire at neurotica.com) wrote:
> 
>   Let me put it this way...on every machine that I've used that wasn't
> running bare SysV, I've been able to wype "which foo" and have the box
> tell me where an executable named "foo" is.  And it's always been
> exactly right.

Er, right, but it's not supposed to tell you where an executable named
"foo" is. It's supposed to tell you what will happen when you type
"foo" -- if the command is an alias or a builtin or appears twice in
your path. So if the system cshrc defines an alias named "foo", it'll
tell you that "foo" is an alias when it's not. And what does 'which
kill' give you in bash? I bet it tells you that typing 'kill' will run
'/bin/kill'. Guess what? It won't.

If you'd rather ignore the manual pages, great, but there's no need to
spread ignorance around by telling other people that it does something
it doesn't do, when the alternatives 'type' and sometimes 'whence' do
exactly as expected. (By the way, for what you think which(1) does --
finding an executable by a certain name -- you want whereis(1), which
looks in standard places for executables, manpages and source.)

  -Rich

-- 
------------------------------ Rich Lafferty ---------------------------
 Sysadmin/Programmer, Instructional and Information Technology Services
   Concordia University, Montreal, QC                 (514) 848-7625
------------------------- rich at alcor.concordia.ca ----------------------



More information about the rescue mailing list