How can I see the permissions for a file (e.g. if I want to recreate those permissions for another file using
For example after I run
chmod 644 on
foo.txt, what command, if any, can I run on
foo.txt which returns
If you type
You can use table below to convert
And get more detail here.
The easiest way to get the octal permissions from the command line is by using
You can read more in the manual page, but the following will give you what you want:
The easiest way I'm aware of that will list all permissions, including ACLs, is simply to use the Get Info command from the Finder on the concerned file.