Skip to content

Instantly share code, notes, and snippets.

@matthewhudson
Created January 8, 2013 21:22
Show Gist options
  • Save matthewhudson/4488081 to your computer and use it in GitHub Desktop.
Save matthewhudson/4488081 to your computer and use it in GitHub Desktop.
UNIX permissions
# Recursively chmod only directories
find . -type d -exec chmod 755 {} \;
# Similarly, recursively set the execute bit on every directory
chmod -R a+X *
# The +X flag sets the execute bit on directories only
# Recursively chmod only files
find . -type f -exec chmod 644 {} \;
# Recursively chmod only JS files (with extension .js)
find . -type f -name '*.js' -exec chmod 644 {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment