in reply to Save permissions on a directory tree

you can use this: perl -e 'printf "%04o $_\n", (stat)[2] while </etc/*>'

perldoc -f stat