getfacl
パーミッション
書き方
getfacl [path]所有者、グループ、その他とは別に付いた権限一覧を表示します。acl パッケージを入れた Linux のもので、macOS は ls -le で独自の ACL を見せます。
よく使うオプション
| オプション | 意味 |
|---|---|
| -R | Walk a whole tree |
| -d | Show the default ACL that new files will inherit |
| -a | Show only the ACL of the file itself |
| --omit-header | Leave out the three comment lines |
| -e | Print the effective rights after the mask is applied |
例
getfacl report.pdfThe ACL plus the ordinary owner and group bits.
getfacl dir | setfacl --set-file=- other_dirCopies one ACL onto another directory.
ls -le report.pdfHow macOS shows its own kind of ACL instead.
数字モードと記号モードは同じものを指します。755 と u=rwx,go=rx は同じ意味です。
読み方
- 角括弧 [ ] は省いてよい部分です。
- 三点 … は複数並べられるという意味です。
- オプションは大文字小文字を区別します — -r と -R が別物のコマンドもあります。
よくある質問
Q. getfacl は何をしますか。
所有者、グループ、その他とは別に付いた権限一覧を表示します。acl パッケージを入れた Linux のもので、macOS は ls -le で独自の ACL を見せます。
Q. どう打ちますか。
getfacl [path] — 角括弧は省いてよい部分です。
Q. よく使うオプションはいくつですか。
ここにまとめたのは5個です。全部は man getfacl にあります。このコマンドはパーミッションの仲間です。
関連するコマンド
man ページ: man getfacl