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 found the answer from Dmytro L very cool. But, unfortunately, it's doesn't work, because it's generate entries like:
chmod -rw-r--r-- ./.bashrc
To avoid it, I use following command:
find . -type f | xargs stat -c "%a %n" | awk '{print "chmod "$1" "$2}' > ./filesPermissions.sh
Basically, it does the same, but generate octal entries like:
chmod 644 ./.bashrc
which works.