How can I get octal file permissions (numbers) from command line?

  Administration

Usage:

With files:


    $ stat -c "%a %n" ./Documents/test.html 
    664 ./Documents/Udev.html

With folders:


    $ stat -c "%a %n" ./Documents/
    755 ./Documents/