Skip to content

Instantly share code, notes, and snippets.

@reidransom
Created June 3, 2011 18:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reidransom/1006874 to your computer and use it in GitHub Desktop.
Save reidransom/1006874 to your computer and use it in GitHub Desktop.
Recursively chmod files and directories separately
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
@reidransom
Copy link
Author

Beginning in the current directory and searching recursively, it finds all files that are not directories and performs chmod on them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment