Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Aug 2000 20:25:20 +0100
From:      Mark Ovens <marko@freebsd.org>
To:        Ben Smithurst <ben@freebsd.org>
Cc:        doc@freebsd.org
Subject:   Re: locate(1) manpage
Message-ID:  <20000822202520.E254@parish>
In-Reply-To: <20000820212720.C84036@strontium.scientia.demon.co.uk>; from ben@freebsd.org on Sun, Aug 20, 2000 at 09:27:20PM %2B0100
References:  <20000820130425.B254@parish> <20000820212720.C84036@strontium.scientia.demon.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Aug 20, 2000 at 09:27:20PM +0100, Ben Smithurst wrote:
> Mark Ovens wrote:
> 
> > The 2nd paragraph of DESCRIPTION says:
> > 
> >      Shell globbing and quoting characters (``*'', ``?'', ``\'', ``[''
> >      and ``]'') may be used in pattern, although they will have to be
> >      escaped from the shell.  Preceding any character with a backslash
> >      (``\'') eliminates any special meaning which it may have.  The
> >      matching differs in that no characters must be matched explicitly,
> >      including slashes (``/'').
> > 
> > The last sentence just doesn't make sense, no matter how many times I
> > read it (looking at the source code doesn't make it any clearer
> > either).
> 
> I think it means this....  In the shell, "echo *" just gets files in
> the current directory, but "locate '*'" will get you all files. i.e. in
> the shell, you must specify one '/' for each '/' in the filename which
> will get matched.  Am I making any sense at all here?  I don't feel like
> it...
> 

I understand what you mean, but I think it is more complicated than
that. Try

      # locate "/include/"
      # locate "*include/"
      # locate "/include*"

I would expect them to return the same results, i.e.
/usr/include/ctype.h would be listed by all three, but not so;
"*include/" returns no matches and neither does "/include*".

-- 
		4.4 - The number of the Beastie
________________________________________________________________
51.44°N  FreeBSD - The Power To Serve http://www.freebsd.org
2.057°W  My Webpage http://ukug.uk.freebsd.org/~mark
mailto:marko@freebsd.org                http://www.radan.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000822202520.E254>