Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How can I find all files with some extended ACLs set, i.e. those with a little + at the end of the permission flags shown by ls -l.

I could not find a corresponding flag for find. My naive approach would be a find combined with ls -l and a grep. But I don't think this is nice.

Does someone have an idea?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

getfacl can dump ACLs recursively, and it has a --skip-base option for ignoring files without ACLs.

getfacl -R -s -p /directory | sed -n 's/^# file: //p'
share|improve this answer

I found this googling the opposite; to find files with no ACLs set. This is what I ended up with (in case some other googler finds it)

ls --color=auto -lR | grep -v "\+ " | grep -v "^[.,a-z,1-9]" | grep -v "^$"

Apparently ls -R is faster than find (I have a kagillion files and each find command is taking me 2 hours).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.