How can I search for files that have a specific permission. For example, I have 10000 files and I want to find the ones that have the READ ONLY flag. In another case I want to search for another that has a particular owner. Or in another to see the files that are READ ONLY and EXECUTABLE.
It's probably easiest to use the
For files belonging to a particular user you could use
For files executable (for all) you could use
For those that are executable and read-only for all you would use 555 in place of 777 in the example above. You can also search for files that belong to a group by substituting
To negate the search terms and so search for the exact opposite, you can use an exclamation mark like this:
Note: Specifying a dash before the permissions (e.g.
Note2: Combinations of permissions can be sought as well using
Directories can be searched for with