Page Index Toggle Pages: 1 Print
Server CHMOD [command line] (Read 2166 times)
Captain John
Ex Member


Server CHMOD [command line]
Feb 16th, 2010 at 8:02pm
Print Post  
If you want to do a recursive chmod on a set of files below a given directory or folder using the bash shell you can do the following:

Code
Select All
    find . -type f -name ‘*.lng’ -exec chmod 666 {} \; 



   Change extension to file type desired (such as pl and 755).  This command can be easily adapted to work for other file types or modes. The ‘.’ following ‘find’ specifies the root directory for the operation.

How to chmod all folder/directories below the current directory…

Code
Select All
    find . -type d -exec chmod 755 {} \; 



Alternatively, chmod on all directories below a given directory (./somedir)

Code
Select All
    find ./somedir -type d -exec chmod 755 {} \; 

  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Print
 
  « Board Index ‹ Board  ^Top