Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: how to: change chmod to 777 of all files in a spesific name in whole server  (Read 5613 times)

0 Members and 1 Guest are viewing this topic.

doncamillo

    Topic Starter


    Greenhorn

    Is it possible to change chmode of a spesific file but in different folders?

    change all x.php in /home folder. There are lots of x.php and i dont want to change chmod one by one.

    is it possible to do this with one shot?

    tnx

    ghostdog74



      Specialist

      Thanked: 27
      Code: [Select]
      find /home -type f -name "X.php" -exec chmod 777 "{}" \;

      doncamillo

        Topic Starter


        Greenhorn

        Thank you very very much. I am searching this command for days. And it worked.

        what if change a permision of a FOLDER not file?


        How can we do this?

        ghostdog74



          Specialist

          Thanked: 27
          Thank you very very much. I am searching this command for days. And it worked.

          what if change a permision of a FOLDER not file?


          How can we do this?
          check the man page of find command. look for -type explanation.

          doncamillo

            Topic Starter


            Greenhorn

            Tnx again.

            "-type d"

            :)