how to add execution permission (+x) to all scripts

Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
we have under /var/scripts/.../.../..
a lot of script as ( .sh .bash .py )
/var/scripts/.../.../klo.py
/var/scripts/.../.../klo.sh
/var/scripts/.../.../kjrbom.py
.
.
.
.
how to add for these scripts the execution permission +x , by find command
find need to add to all scripts that ended with ( .sh / .bash / .py ) the +x permissions
find /var ......... chmod +x .....
linux permissions find chmod
add a comment |Â
up vote
1
down vote
favorite
we have under /var/scripts/.../.../..
a lot of script as ( .sh .bash .py )
/var/scripts/.../.../klo.py
/var/scripts/.../.../klo.sh
/var/scripts/.../.../kjrbom.py
.
.
.
.
how to add for these scripts the execution permission +x , by find command
find need to add to all scripts that ended with ( .sh / .bash / .py ) the +x permissions
find /var ......... chmod +x .....
linux permissions find chmod
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
we have under /var/scripts/.../.../..
a lot of script as ( .sh .bash .py )
/var/scripts/.../.../klo.py
/var/scripts/.../.../klo.sh
/var/scripts/.../.../kjrbom.py
.
.
.
.
how to add for these scripts the execution permission +x , by find command
find need to add to all scripts that ended with ( .sh / .bash / .py ) the +x permissions
find /var ......... chmod +x .....
linux permissions find chmod
we have under /var/scripts/.../.../..
a lot of script as ( .sh .bash .py )
/var/scripts/.../.../klo.py
/var/scripts/.../.../klo.sh
/var/scripts/.../.../kjrbom.py
.
.
.
.
how to add for these scripts the execution permission +x , by find command
find need to add to all scripts that ended with ( .sh / .bash / .py ) the +x permissions
find /var ......... chmod +x .....
linux permissions find chmod
asked Nov 6 '17 at 14:56
yael
2,0251145
2,0251145
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
With find:
find /var/scripts/ -type f -regex '.*.(py|sh|bash)$' -exec chmod +x +
You might want to check the files first:
find /var/scripts/ -type f -regex '.*.(py|sh|bash)$'
-regex '.*.(py|sh|bash)$'matches file(s) ending in the given three patterns-regexmatches the whole filename, hence we need.*to match anything at start
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
With find:
find /var/scripts/ -type f -regex '.*.(py|sh|bash)$' -exec chmod +x +
You might want to check the files first:
find /var/scripts/ -type f -regex '.*.(py|sh|bash)$'
-regex '.*.(py|sh|bash)$'matches file(s) ending in the given three patterns-regexmatches the whole filename, hence we need.*to match anything at start
add a comment |Â
up vote
2
down vote
accepted
With find:
find /var/scripts/ -type f -regex '.*.(py|sh|bash)$' -exec chmod +x +
You might want to check the files first:
find /var/scripts/ -type f -regex '.*.(py|sh|bash)$'
-regex '.*.(py|sh|bash)$'matches file(s) ending in the given three patterns-regexmatches the whole filename, hence we need.*to match anything at start
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
With find:
find /var/scripts/ -type f -regex '.*.(py|sh|bash)$' -exec chmod +x +
You might want to check the files first:
find /var/scripts/ -type f -regex '.*.(py|sh|bash)$'
-regex '.*.(py|sh|bash)$'matches file(s) ending in the given three patterns-regexmatches the whole filename, hence we need.*to match anything at start
With find:
find /var/scripts/ -type f -regex '.*.(py|sh|bash)$' -exec chmod +x +
You might want to check the files first:
find /var/scripts/ -type f -regex '.*.(py|sh|bash)$'
-regex '.*.(py|sh|bash)$'matches file(s) ending in the given three patterns-regexmatches the whole filename, hence we need.*to match anything at start
answered Nov 6 '17 at 14:58
heemayl
33.1k36897
33.1k36897
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f402843%2fhow-to-add-execution-permission-x-to-all-scripts%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password