I am looking for a way to express this command that excludes all executable perms, except for those files that end with ".EXE"
I am trying to solve it using the command "find" and -exec, please. Thank.
The command I tried and other versions of the same do not work:
find . -type f -regex "[^\.EXE$]" -printf "%f\n" -exec chmod a-x {} +
Thanks, help, Beco.
Edited by:
To find the "reverse" regex, I tried after (more) research:
find . -type f ! -regex ".EXE$" -printf "%f\n" -exec chmod a-x {} +
But that also didn't work.
source
share