How to get permissons of a file/directory

If you want to see permissions of a file or a directory in both human readable and octal notation issue this command:



The output is as follows:



Mac OS X:

The output is as follows:



Share on FacebookTweet about this on TwitterShare on LinkedInShare on Google+Pin on PinterestEmail this to someone
Follow me:


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)


  1. rene says

    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

  2. rene says

    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.

We will be happy to hear back from you

Please Login to post a comment