script files

Discussion in 'all things UNIX' started by lodore, Aug 4, 2011.

Thread Status:
Not open for further replies.
  1. lodore

    lodore Registered Member

    Joined:
    Jun 22, 2006
    Posts:
    9,065
    Hello,
    I have a few folders with quite complex folder structures. ( I know all the files inside are safe)

    all i want to do is make all the .sh files in those folders executable.

    i know how to make a single file executable: chmod 775 (location and name go here)

    edit: think ive just sorted it.

    chmod 775 -R (location) and that command makes all files inside executable.
     
    Last edited: Aug 4, 2011
  2. ashishtx

    ashishtx Registered Member

    Joined:
    Oct 7, 2005
    Posts:
    392
    Location:
    Houston,Texas
    find . -type f -name '*.sh' -print0 | xargs -0 chmod 775

    I hope it works. I am new to UNIX :)
     
    Last edited: Aug 4, 2011
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.