Advertisement
Guest User

Untitled

a guest
Aug 20th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. # Save the permissions
  2. find * -depth -exec stat --format '%a %u %g %n' {} + >/tmp/save-the-list
  3.  
  4. # Restore the permissions
  5. while read PERMS OWNER GROUP FILE
  6. do
  7. chmod "$PERMS" "$FILE"
  8. chown "${OWNER}:${GROUP}" "$FILE"
  9. done </tmp/save-the-list
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement