RE: find

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

 



> 
> But now the files I am actually looking for are called 
> (test)a ,b ,c etc this is what find returns.
> 
> |[chadley@chadlin play]$ find .  \(test\)a
> |find: invalid predicate `(test)a'
> |[chadley@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



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux