Difference between 'getfacl' and 'ls -l'

0

What is the difference between
getfacl and ls -l in Linux?
Both of them produce output with the same content.
Am I wrong?

sunny

Posted 2017-05-31T08:32:19.250

Reputation: 175

Answers

1

From the getfacl(1) man page:

For each file, getfacl displays the file name, owner, the group, and the Access Control List (ACL). If a directory has a default ACL, get‐ facl also displays the default ACL. Non-directories cannot have default ACLs.

Basically, getfacl is used to get the filename, the owners, and the file mode in a shell script friendly output. Unlike ls, which is used mainly to list directory contents.

yuki_is_bored

Posted 2017-05-31T08:32:19.250

Reputation: 56