How to find all files that is not accessible for the reading?
Rustam Atai
For example, we need to find files and directories that are not readable by the "other" group.
Such objects typically have permission modes like:
077007500700
That means "other" users have no read permission (--- at the end).
🛠️ Method 1: Using -perm
Find files where "other" users do NOT have read permission:
find . ! -perm -o=r
🛠️ Method 2: Using -readable
Alternatively, run the command as a user from a different group ("other"):
find . ! -readable
💡 Notes
-perm -o=rchecks if "other" has read permission!negates the condition-readablechecks readability for the current user- Results may differ depending on which user runs the command