Skip to content

Instantly share code, notes, and snippets.

@jesugmz
Last active September 5, 2016 23:21
Show Gist options
  • Save jesugmz/19730304dd0e07f053c7 to your computer and use it in GitHub Desktop.
Save jesugmz/19730304dd0e07f053c7 to your computer and use it in GitHub Desktop.
Recursive chmod for directories and files
#!/bin/bash
#
# Recursive chmod for directories and files.
#
# all directories within the current path to 755 (-rwxr-xr-x)
find . -type d -exec chmod 755 {} \;
# all files within the current path to 644 (-rw-r--r--)
find . -type f -exec chmod 644 {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment