Skip to content

Instantly share code, notes, and snippets.

@keikoro
Created August 11, 2013 18:17
Show Gist options
  • Save keikoro/6206188 to your computer and use it in GitHub Desktop.
Save keikoro/6206188 to your computer and use it in GitHub Desktop.
Replace group permissions of certain files.
# ~ find in $HOME
# fdl file types: f = file, d = directory, l = symbolic link
# $GROUP current group permission
# -exec do something with found files
# :$NEWGROUP new group permission (needs leading colon! -> chown owner:group)
# {} placeholder for each found file
# \; escape the semicolon that ends the -exec part of the command
find ~ -type fdl -group $GROUP -print -exec chown :$NEWGROUP {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment