{get,set}facl: update & unify style (#12169)

* {get,set}facl: update & unify style

- setfacl: add acronym to description
- setfacl: `{{file}}` -> `{{path/to/file_or_directory}}`
- {get,set}facl: use long options

* {get,set}facl: add mnemonics
pull/23/head
cyqsimon 2024-02-06 22:16:32 +08:00 committed by GitHub
parent 5bdf79a65d
commit 4073a9fd5b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 11 deletions

View File

@ -1,16 +1,16 @@
# getfacl
> Get file access control lists.
> Get file access control lists (ACL).
> More information: <https://manned.org/getfacl>.
- Display the file access control list:
`getfacl {{path/to/file_or_directory}}`
- Display the file access control list with numeric user and group IDs:
- Display the file access control list with [n]umeric user and group IDs:
`getfacl -n {{path/to/file_or_directory}}`
`getfacl --numeric {{path/to/file_or_directory}}`
- Display the file access control list with tabular output format:
- Display the file access control list with [t]abular output format:
`getfacl -t {{path/to/file_or_directory}}`
`getfacl --tabular {{path/to/file_or_directory}}`

View File

@ -3,18 +3,18 @@
> Set file access control lists (ACL).
> More information: <https://manned.org/setfacl>.
- Modify ACL of a file for user with read and write access:
- [M]odify ACL of a file for user with read and write access:
`setfacl -m u:{{username}}:rw {{file}}`
`setfacl --modify u:{{username}}:rw {{path/to/file_or_directory}}`
- Modify default ACL of a file for all users:
- [M]odify [d]efault ACL of a file for all users:
`setfacl -d -m u::rw {{file}}`
`setfacl --modify --default u::rw {{path/to/file_or_directory}}`
- Remove ACL of a file for a user:
`setfacl -x u:{{username}} {{file}}`
`setfacl --remove u:{{username}} {{path/to/file_or_directory}}`
- Remove all ACL entries of a file:
`setfacl -b {{file}}`
`setfacl --remove-all {{path/to/file_or_directory}}`