パーミッションを数字で取得する方法

[root@localhost ~]# ll /root
合計 4
-rwxrwxrwx  1 root root    0  1月  8 03:21 a
-rw-------. 1 root root 1255 12月  3 18:12 anaconda-ks.cfg
-rwxr----x  1 root root    0  1月  8 03:21 b
[root@localhost ~]#
[root@localhost ~]# stat /root/* -c '%a'
777
600
741

参考:Linuxでファイルのパーミッションを数字で取得する | 俺的備忘録 〜なんかいろいろ〜

コメント

タイトルとURLをコピーしました