Linux - Shell script to modify directory permission, Change all directory permission

Shell script to modify directory permission


Shell Script to Modify permission of all directories

Step 1: create a directory name list

eg: if you want to change all public_html directory permission to 755
   $ cd /home

   $ ls > /root/dir_list 

step2: Copy and past it in the command prompt
   $ for i in $(cat /root/dir_list ); do chmod 755 $i/public_html ; done 

The above script will change the permission for all the directories.

The topic on Linux - Shell script to modify directory permission is posted by - Ravi

Hope you have enjoyed, Linux - Shell script to modify directory permissionThanks for your time

Tech Bluff