find

J. Erik Hemdal ehemdal at townisp.com
Mon Jun 7 12:56:18 UTC 2004


> 
> But now the files I am actually looking for are called 
> (test)a ,b ,c etc this is what find returns.
> 
> |[chadley at chadlin play]$ find .  \(test\)a
> |find: invalid predicate `(test)a'
> |[chadley at chadlin play]$ find . '(test)a'
> |find: invalid predicate `(test)a'
> 
> Can someone direct me to the light please.

Chadley:

Perhaps try

find . -name '(test)[abc]'

. begins the search in the CWD
' ' single quotes protect the regular expression from the shell
(avoiding the interpolation of your parentheses.
Regexp gives you the text '(test)' followed by any one of 'a', 'b', or
'c'.

This should find

./(test)a
./(test)b
./(test)c

I hope this helps.  Erik





More information about the fedora-list mailing list