bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [find] enable paths starting with a comma


From: James Youngman
Subject: Re: [find] enable paths starting with a comma
Date: Sun, 3 Aug 2003 11:46:51 +0100
User-agent: Mutt/1.3.28i

On Sat, Aug 02, 2003 at 07:09:42PM +0200, Michael Teichgr?ber wrote:

> Since the time I have been using Tom Lord's arch RCS, I have got used to
> sometimes prepend the names of temporary "junk" files and directories
> with `,'. At the moment `find ,foo -type f' would not work, because of
> 
>     find: invalid predicate `,foo'.

Yes, this is because of the behaviour documented in the find(1) manual page :-

||     The first argument that begins with `-', `(', `)', `,', or
||     `!' is taken to be the beginning of  the  expression;  any
||     arguments before it are paths to search, and any arguments
||     after it are the rest of the expression.  If no paths  are
||     given, the current directory is used.  If no expression is
||     given, the expression `-print' is used.


I suggest that you consider using this instead :-

   find ./,foo -type f -print

That will achieve what you want without requiring find to be patched.
However, I can't immediately see why a comma is treated in the way you
describe.

Does anybody on the list know why find(1) treats the comma in this
way?  Perhaps this is a POSIX standard - I'm at a conference and don't
have an opportunity to refer to the POSIX standard just now.

-- 
James Youngman.
CSSC Bug reporting page:       http://sf.net/tracker/?group_id=8064&atid=108064
GNU Findutils bug reporting page: http://savannah.gnu.org/bugs/?group=findutils




reply via email to

[Prev in Thread] Current Thread [Next in Thread]