I am using a linux system and need to experiment with some permissions on a set of nested files and directories. I wonder if there is not some way to save the permissions for t
I borrow this answer from roaima's post. I think this should be the best answer: 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