4 ms·
While we're here sharing random cli-fu, you might like `find`'s native ability to spawn processes. Check out the `-exec` flag: find . -type f -exec chmod -
by xelxebar 9y ago
While we're here sharing random cli-fu, you might like `find`'s native ability to spawn processes. Check out the `-exec` flag:
find . -type f -exec chmod -x {} \+
- schoen 9y agoThis is more correct than the previous poster's approach, because it will work with files that contain space characters, while the previous poster's version breaks in this situation. Another approach that works is find . type f -print0 | xargs -0 chmod -x although find's built-in -exec can be easier to use than xargs for constructing some kinds of command lines.
- Exuma 9y agoNice, thanks for that revision