Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Save the permissions
- find * -depth -exec stat --format '%a %u %g %n' {} + >/tmp/save-the-list
- # Restore the permissions
- while read PERMS OWNER GROUP FILE
- do
- chmod "$PERMS" "$FILE"
- chown "${OWNER}:${GROUP}" "$FILE"
- done </tmp/save-the-list
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement