EN
Bash - add permission to execute all *.sh files located in some directory
10 points
In this article we would like to present simple way how to add permission to execute all *.sh files located in some directory using Bash.
Quick solution:
xxxxxxxxxx
1
find /path/to/directory -name "*.sh" -exec chmod u+x {} \;
Note: above command will find all *.sh scripts (even in subdirectories) and will add them execution permissions (
u+x
- user add execution permissions)
In this section we can see command running example on current working directory.
xxxxxxxxxx
1
find . -name "*.sh" -exec chmod u+x {} \;