Skip to content

Instantly share code, notes, and snippets.

@reelsense
Last active October 25, 2017 22:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reelsense/fbb8e6d78444664d612b146ee162b9bd to your computer and use it in GitHub Desktop.
Save reelsense/fbb8e6d78444664d612b146ee162b9bd to your computer and use it in GitHub Desktop.
Example usage

Example usage - find

Permission Changes in Bulk

Find all folders and change permissions to rwxr-xr-x.

find project/ -type d -exec chmod 755 {} \;

Find all folders and change ownership.

find project/ -type d -exec chown user\:group {} \;

Find all files and change permissions to rw-r--r--.

find * -type f -exec chmod 644 {} \;

Git Commands in Bulk

Find all git repositories 2 folders deep from the current diroctory and update them.

find . -type d -depth 2 -exec git --git-dir={}/.git --work-tree=$PWD/{} pull origin master \;

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