chmod: How to recursively add execute permissions only to files which already have execute permission [closed] chmod: How to recursively add execute permissions only to files which already have execute permission [closed] unix unix

chmod: How to recursively add execute permissions only to files which already have execute permission [closed]


Use find:

find . -perm /u+x -execdir chmod a+x {} \;


You can use find to get all those files:

find . -type f -perm -o+rx -print0 | xargs -0 chmod a+x

Update: add -print0 to preserve space in filenames