1

for running a program, I need to change its install file to a executable file. I can do that, but my problem is that program calls some subroutines and those need to be executable too. Is there any way to change the mode of those files at once. I do not want to make all files executable, just subroutines. Thank you.

  • I think you have to find which subroutine in which file & than apply chmod to all that files. – DreamCoder May 19 '15 at 2:49
  • Actually, I did that. There were a lot of files. Anyway, it's good to know if there is a way. – Ayat Ghazi May 21 '15 at 23:20
  • How can the files be identified? Are there any names or other features? – A.B. May 22 '15 at 4:51
0

Like for script files command

find -name "*.sh" -type f -exec chmod +rx {} +

This command find all script files & give full permission.

I hope this help you

  • 1
    -1 for chmod 777. Also, chmod doesn't read from standard input. – muru May 22 '15 at 1:48
  • Sorry , now I think it works – DreamCoder May 22 '15 at 1:59
  • And for files without the extension sh? – A.B. May 22 '15 at 4:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.