Learn about our website mirrors here.
File Permission of the Sh Files
by samueltarcin9999 - May 21, 2019 at 08:25 AM
#1
I have directory where a lot of bash script or sh file exist. I want to change their permission to the 770 with the chmod command. How can i accomplish that? Thanks.
Reply
#2
Best way is using find command with the -exec option where you can use chmod.
$ find /my/bashfiles/ -type d -name *.c -exec chmod 770 {} \;
read below: https://www.poftut.com/set-permission-fo...ers-linux/
Reply
#3
you should be using -type f if you're trying to execute chmod on the actual c files.
Reply
#4
chmod 770 /directory/path/*.sh
Reply
#5
find . -type f -name '*.sh' -exec chmod 770 {} \;
Reply
#6
find type command will show you the files then you -exec chmod 770
Reply

Possibly Related Threads…
Thread Author Replies Views Last Post
Sort multiple text file in a directory henry123 9 232 May 11, 2020 at 02:09 PM
Last Post: danstew2019
Copy bulk Files in Linux Gabriel9999 4 136 May 08, 2020 at 01:01 AM
Last Post: danstew2019

 Users browsing this thread: 1 Guest(s)