getfacl

>Usage

getfacl is used to display the ACLs of a file or directory.

It allows you to view the permissions that are set for users or groups in addition to the regular owner/group/other model.

>Synopsis

$ getfacl file.txt [option] [option]

>Options

No options (default)

Displays the ACL entries of a file or directory.

Example 1:

Dots

-zsh

> getfacl file.txt


-n (numeric)

Displays ACL entries in numeric format.

Example 2:

Dots

-zsh

> getfacl -n file.txt


-a (all)

Includes additional attributes like the file's access time in the output.

Example 3:

Dots

-zsh

> getfacl -a file.txt


-c (complement)

Displays the complement of the current ACL.

Example 4:

Dots

-zsh

> getfacl -c file.txt


-d (default)

Shows the default ACL entries for directories.

Example 5:

Dots

-zsh

> getfacl -d /folder


--absolute

Displays absolute paths for the file or directory.

Example 6:

Dots

-zsh

> getfacl --absolute /folder/file.txt


>Quiz

Progress: Question ? out of ?

Question Title

Page written by Dusan Pavlovic