I would like to search for files that would not match 2 -name
conditions. I can do it like so :
find /media/d/ -type f -size +50M ! -name "*deb" ! -name "*vmdk"
and this will yield proper result but can I join these 2 condition with OR somehow ?
-exec
or any other action on thefind
results, remember to parenthese\( \)
the whole criteria, otherwise-exec
will apply only to the last-or
-ed criterion. To work on all of them, parenthese them:find \( <criterion> -o <criterion> \) -exec <command>
– Victor Sergienko Jun 13 '19 at 20:38-execdir
is preferable wrt-exec
– Alessandro Cuttin Jun 23 '21 at 09:02