Skip to content

Instantly share code, notes, and snippets.

@tavinus
Last active February 25, 2024 02:54
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 tavinus/2f3e2f386603d77c5c44b732d73ce3bd to your computer and use it in GitHub Desktop.
Save tavinus/2f3e2f386603d77c5c44b732d73ce3bd to your computer and use it in GitHub Desktop.
find-chmod

First, cd into the folder that permissions will be changed.

No Sudo

Files 644 / Folders 755

find . -type d -exec chmod 0755 {} \; && find . -type f -exec chmod 0644 {} \;

Files 664 / Folders 775

find . -type d -exec chmod 0775 {} \; && find . -type f -exec chmod 0664 {} \;

With Sudo

Files 644 / Folders 755

sudo find . -type d -exec chmod 0755 {} \; && sudo find . -type f -exec chmod 0644 {} \;

Files 664 / Folders 775

sudo find . -type d -exec chmod 0775 {} \; && sudo find . -type f -exec chmod 0664 {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment