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

The name of the pictureThe name of the pictureThe name of the pictureClash 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 .....






share|improve this question
























    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 .....






    share|improve this question






















      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 .....






      share|improve this question












      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 .....








      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 6 '17 at 14:56









      yael

      2,0251145




      2,0251145




















          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


          • -regex matches the whole filename, hence we need .* to match anything at start






          share|improve this answer




















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            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






























            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


            • -regex matches the whole filename, hence we need .* to match anything at start






            share|improve this answer
























              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


              • -regex matches the whole filename, hence we need .* to match anything at start






              share|improve this answer






















                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


                • -regex matches the whole filename, hence we need .* to match anything at start






                share|improve this answer












                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


                • -regex matches the whole filename, hence we need .* to match anything at start







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 6 '17 at 14:58









                heemayl

                33.1k36897




                33.1k36897



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    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













































































                    Popular posts from this blog

                    Peggy Mitchell

                    Palaiologos

                    The Forum (Inglewood, California)