Get the octal file permission number of a file or directory
The chmod command sets the file permission to an octal number. To see the current value
On macOS
stat -f "%Sp %OLp %N" /MY_FILE_PATH
On GNU Linux
stat -c '%A %a %n' /MY_FILE_PATH
Knowledge Base for IT Professionals, Teachers, and Astronauts
Knowledge Base for IT Professionals, Teachers, and Astronauts