Skip to content

Instantly share code, notes, and snippets.

@detain
Created December 22, 2016 15:50
Show Gist options
  • Save detain/2c37e6690ece6daecc6e78202b7b5446 to your computer and use it in GitHub Desktop.
Save detain/2c37e6690ece6daecc6e78202b7b5446 to your computer and use it in GitHub Desktop.
Read all files in /etc and generate chown lines for them using the current owner/group (for use on another server whos ownership got messed up):
find /etc|xargs -n 1 stat -c "chown %U.%G %n;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment