If you want to see permissions of a file or a directory in both human readable and octal notation issue this command:
Linux:
stat -c "%n %a %A" /tmp # replace /tmp with your file/dir
The output is as follows:
/tmp 1777 drwxrwxrwt
Mac OS X:
stat -f "%N %A %Sp" /private/tmp # replace /private/tmp with your file/dir
The output is as follows:
/private/tmp 1777 drwxrwxrwt
I'm a well seasoned developer, consultant and educator of web applications based mainly on Sencha libraries, PHP, MySQL and Node.js. Besides (Apple) computers, I love photography and mountain biking.
Follow me:
Latest posts by saki (see all)
- Ext, Angular, React, and Vue - 27. June 2019
- The Site Resurgence - 11. February 2018
- Configuring ViewModel Hierarchy - 19. June 2015
3 Responses
No problem with your comments. I’ll correct that post.
Thank you for pointing out this typo. 🙂
Bah! That’s not what it should read 🙂
Since I don’t want to spam comments trying to figure out how to escape the quotes, I’ll just leave you with the instruction to add a quote after the format without explicit example.
Please feel free to remove these two comments, once it’s fixed, Saki.
For everybody that can’t figure it out on their own, the closing quotation mark after the format is missing – it should read:
stat -c