Linux Command to change the permisson of multiple directories/files having the same name

Command to change directory permission of multi directories with the same name:-

find -name 'power' -type d -exec chmod 0777 {} \;

here will search for the directories named ‘power’ all directories inside from the parent directory and change the permission to 777.

Command to change directory permission of multi directories with the same name:-

find -name 'power' -type f -exec chmod 0644 {} \; 

 here will search for the files named ‘power’ all directories inside from the parent directory and change the permission to 644.

Comments

Popular posts from this blog

CDbConnection failed to open the DB connection mysql 8

/bin/sh^M: bad interpreter: No such file or directory Linux

Send mail from Oracle Solaris OS with attached files