lundi 2 juin 2014

find command how to combine OR and AND


Vote count:

0




I would like to find all php and js files inside a directory and exclude one of sub directory. I may have to exclude more than one sub directory in the future.


I tried :



find /home/jul/here -type f -iname "*.php" -o -iname "*.js" ! -path "/home/jul/here/exclude/*"


Problem is that it is excluding only js file from /home/jul/here/exclude.


Is there a way to put some kind of parenthesis?



asked 44 secs ago






Aucun commentaire:

Enregistrer un commentaire