Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@cheeaun
Last active August 26, 2022 08:37
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 cheeaun/c95ec6ca3e882495fbb7f07511232dda to your computer and use it in GitHub Desktop.
Save cheeaun/c95ec6ca3e882495fbb7f07511232dda to your computer and use it in GitHub Desktop.
Random chmod commands
Set all files to 644
> find . -type f -exec chmod 644 {} \;
Set all folders to 755
> find . -type d -exec chmod 755 {} \;
Set all .bin files to executable
> chmod +x node_modules/.bin/*
Find all .bin files
> find . -regex '.*/\.bin/.*'
Get all modified files and then 644 them
Via https://stackoverflow.com/a/36153927
> git status -suno | grep ' M ' | cut -c 4- | xargs chmod 644
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment