How to view the octal permissions of a file or folder in Linux

stat -c "%a %n" <path to file or folder>

From the manpage of stat:

-c  --format=FORMAT
          use  the  specified  FORMAT instead of the default; output a newline after
          each use of FORMAT
%a     Access rights in octal
%n     File name


Written on November 9, 2014