Translate rwx Permissions into Octal Format in Linux

Sometimes you may find it useful to display the access rights of files or directories in octal form instead of rwx or perhaps you want to display both.

Instead of using the good old ls -l command, in most modern Linux distributions (if not all), you will find stat, a utility that displays file or filesystem status.

Originally Published at Translate rwx Permissions into Octal Format in Linux