Usage: stat [OPTION]... FILE...
Display file or file system status.
-L, --dereference follow links
-f, --file-system display file system status instead of file status
-c --format=FORMAT use the specified FORMAT instead of the default;
output a newline after each use of FORMAT
--printf=FORMAT like --format, but interpret backslash escapes,
and do not output a mandatory trailing newline.
If you want a newline, include \n in FORMAT
-t, --terse print the information in terse form
--help display this help and exit
--version output version information and exit
The valid format sequences for files (without --file-system):
%a Access rights in octal
%A Access rights in human readable form
...
%a
それもオプションですか?
どうやって使うの?
答え1
それ書式指定子~のためオプション -c
オプション自体ではない
$ stat -c '%a' myfile
664
または
$ stat -c '%n %a' myfile
myfile 664