获取CHMOD值和所有者名- Unix



它们是获取CHMOD的任何命令Unix上目录的值和所有者名

期望输出:PATH/OF/DIR 777 ADMIN

stat -c "%n %a %U" -- *

将通配符更改为您希望/需要的特定目录。

源自man 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 (note '#' and '0' printf flags)
%n     file name
%U     user name of owner

最新更新