Terminal – Get file or folder permission in octal numerical format

Often with GNU Linux you will be asked to change the permissions of a file or folder via the terminal using chmod as below. For a file: chmod 644 my_file or for a folder: chmod 755 my_folder However, when you want to check a file or folders permissions in this octal numerical format ls is not going to help you. To view the octal numerical format permissions of a file or folder you can use the command below. For a file: stat -c "%a %n" my_file or for a folder: stat -c "%a %n" my_folder ...
Read More