delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/07/24/12:48:10

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Wed, 24 Jul 2002 12:47:50 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
To: cygwin AT cygwin DOT com
Subject: Re: whereis whereis?
In-Reply-To: <ahmj3s$4r6$1@main.gmane.org>
Message-ID: <Pine.GSO.4.44.0207241243270.22417-100000@slinky.cs.nyu.edu>
MIME-Version: 1.0

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 AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019