How can I see the permissions for a file (e.g. if I want to recreate those permissions for another file using chmod)?
For example after I run chmod 644 on foo.txt, what command, if any, can I run on foo.txt which returns 644?
|
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 |
|||
|
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:
For example:
|
|||
|
|
|
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. |
|||
|
|
ls -l foo.txtwhich will give you the rwxrwx--- string which you can convert to octal yourself (but I guess you know that already). – Lizzan Oct 18 '10 at 18:30