This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: locate lacks -r regular expression flag in Cygwin
- From: Brian Ford <ford at vss dot fsi dot com>
- To: Keith Christian <keithchristian at yahoo dot com>
- Cc: cygwin at cygwin dot com
- Date: Wed, 16 Jun 2004 17:30:47 -0500
- Subject: Re: locate lacks -r regular expression flag in Cygwin
- References: <20040616221631.37025.qmail@web52205.mail.yahoo.com>
- Reply-to: cygwin at cygwin dot com
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/