Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Wed, 16 Jun 2004 17:30:47 -0500
From: Brian Ford <ford@vss.fsi.com>
Reply-To: cygwin@cygwin.com
To: Keith Christian <keithchristian@yahoo.com>
cc: cygwin@cygwin.com
Subject: Re: locate lacks -r regular expression flag in Cygwin
In-Reply-To: <20040616221631.37025.qmail@web52205.mail.yahoo.com>
Message-ID: <Pine.CYG.4.58.0406161722220.3804@fordpc.vss.fsi.com>
References: <20040616221631.37025.qmail@web52205.mail.yahoo.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-IsSubscribed: yes

On Wed, 16 Jun 2004, Keith Christian wrote:

> I'm running this version of Cygwin:
>
> CYGWIN_NT-5.1 den-aet-xpw002 1.5.5(0.94/3/2) 2003-09-20 16:31 i686 unknown
> unknown Cygwin

I'd suggest you upgrade unless you have a good reason not to.

> on Windows XP Pro.
>
> On Linux, I use the "-r" flag to search for regular expressions as shown
> below:
>
> $ locate --version
> GNU locate version 4.1.7

On a RedHat Linux box:

procbox1 /home/ford > locate --help
Secure Locate 2.6 - Released May 21, 2001
[snip]
   -r <regexp>
   --regexp=<regexp>  - Search the database using a basic POSIX regular
                        expression.

Does that explain your difference?

> KChristian@den-aet-xpw002 ~
> $ locate -r "test.*xls"
> locate: invalid option -- r
> Usage: locate [-d path | --database=path] [-e | --existing]
>       [-i | --ignore-case] [--version] [--help] pattern...
>
> Is there any reason why the version of "locate" in Cygwin doesn't support
> this?  Is it a limitation of Microsoft's NTFS file system?

I don't think so.  It's probably just a deficiency in GNU locate.

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained pilot...

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

