unix get file permissions code example Example 1: check octet permission ubuntu stat -c "%a %n" * Example 2: how to see permissions for file in linux ls –l [file_name]