Since this is begging to turn into a TMTOWTDI fest, here's how I'd write that:
find ./ -type f -print0 | xargs -0 chmod --changes a-x
I think this is preferable for a few reasons:
- find | xargs is often much faster than find -exec. This is because -exec forks once for each file, whereas xargs executes the command with as many arguments as will fit on one command line. It may not seem like a big deal, but the difference in speed adds up fast.
- The --changes option only prints files that actually got changed. This may be a GNU-only switch, but it's useful.