What is the octal representation of the file owner's mode : rw-?
Answers
Answered by
0
You can try
stat -c "%a %n" *
Replace * with the relevant directory or the exact filename that you want to examine.
From the man page of stat,
-c --format=FORMAT use the specified FORMAT instead of the default; output a newline after each use of FORMAT %a Access rights in octal %n File name
Usage:
With files:
$ stat -c "%a %n" ./Documents/Udev.html 664 ./Documents/Udev.html
With folders:
$ stat -c "%a %n" ./Documents/ 755 ./Documents/
stat -c "%a %n" *
Replace * with the relevant directory or the exact filename that you want to examine.
From the man page of stat,
-c --format=FORMAT use the specified FORMAT instead of the default; output a newline after each use of FORMAT %a Access rights in octal %n File name
Usage:
With files:
$ stat -c "%a %n" ./Documents/Udev.html 664 ./Documents/Udev.html
With folders:
$ stat -c "%a %n" ./Documents/ 755 ./Documents/
Similar questions