This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: whereis whereis?


On Wed, 24 Jul 2002, Mike Maxwell wrote:

> Back in the '80s (before some of you were born?), I used a Sun version of
> unix.  I now have Cygwin installed on my Windows PC (no flames), and I can't
> find a utility that I used a lot: whereis.  It exists on the Sun sitting
> next to my PC, so I know I'm not just being senile.
>
> 'apropos' doesn't return anything for 'whereis' or 'where'.  I did a Package
> Search at the Cygwin website for 'whereis', and it only shows up in the
> Z-Shell.  I'm not using Z-Shell, and if I'm interpreting things correctly,
> it's a built-in under that shell.  I'm using bash, so that wouldn't help.
> Nor does the FAQ seem to have anything.
>
> I guess I could implement 'whereis' using 'find' in a shell script, but when
> I tried running 'find / -name foobar' on the command line just now, it was
> excruciatingly slow.  (By comparison, a search beginning at the root of the
> Cygwin dir using a Windows utility finished in well under a second.)
>
> Surely 'whereis' hasn't just gone away??  Or is there a recommended
> replacement?

I can try to address your points in order:
1) the only reason windows find runs fast is that it caches its results
(or you have something like FindFast running in the background).  Using
locate as Vince Hoffman recommended should produce similar results on
cygwin.
2) whereis is distributed as part of standard Linux distributions (I just
checked that there's one in Red Hat 7.3).  I'm sure a source is
obtainable, and porting it should be easy. :-)
3) for a quick and dirty replacement (searching only for binaries) try
'type -a' in bash.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

It took the computational power of three Commodore 64s to fly to the moon.
It takes a 486 to run Windows 95.  Something is wrong here. -- SC sig file


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]