Recursively Change File Permissions on Files/Folders Only [*nix]

/ Published in: Bash
Save to your folder(s)


You want to recursively change all of the file permissions only on folders & subfolders in a directory, but not the files (or vice-versa: you want to change the permissions on files only, not folders).

Copy this code and paste it in your HTML
  1. # This command will recursively search your current directory and chmod all directories & sub-directories only:
  2. find . -type d -exec chmod 755 {} \;
  4. # The following command will chmod all files only (ignoring the directories):
  5. find . -type f -exec chmod 644 {} \;


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.