[LINUX] Recursively change permissions on specific file type

Use the following command to recursively change permissions only on specific file type (e.g, all php files in the main path and related sub-directories):

~$ find . -name "*.php" -exec chmod +x {} \;

The command above searches all php files and excute the chmod command to apply the execution permission (+x).

If you have found this post useful, please visit the Contribute page

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.