I have a directory where a lot of bash scripts or .sh
files exist. I want to change their permissions to 770
(rwxrwx---
) with the chmod
command.
How can I accomplish that?
I have a directory where a lot of bash scripts or .sh
files exist. I want to change their permissions to 770
(rwxrwx---
) with the chmod
command.
How can I accomplish that?
sudo chmod 770 /path/to/your/folder/*.sh
This will set the file permissions to 770 for all .sh
files in the directory /path/to/your/folder/
something.sh
.
– Tamas H.
May 21 '19 at 07:59
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 {} \;
enter link description hereread below: https://www.poftut.com/set-permission-folders-subfolders-linux/
.c
, which is not at all what the OP asked.
– Panki
May 23 '19 at 07:46