Determining a file/directory permissions
I am writing a bash script which will set permissions (chmod/chgrp/chown) on various files and directories on a Linux system. I would ike to be able to determine and save the settings of the file/directory before I change it so I can rollback the changes if there is a problem.
So my question is this - is there a way I can determine the octal setting of a file or directory? Something where I can enter the file in question and get the permissions in numeric form back?
thanks
|