It's probably easiest to use the
find command, which allows you to recursively search through the directory tree. For example, if you particularly wanted to find files that were read-only, you could type
find <specify location> -type f -perm -444
For files belonging to a particular user you could use
find <location> -type f -user mike
For files executable (for all) you could use
find <location> -type f -perm -777
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
-user mike for
To negate the search terms and so search for the exact opposite, you can use an exclamation mark like this:
find <location> -type f ! -perm -444
Note: Specifying a dash before the permissions (e.g.
-perm -444) means that all files that have a read only flag will be found and not just those that are 444; to search for 444 exactly and only that, simply remove the dash (e.g.
Note2: Combinations of permissions can be sought as well using
-a for and and
-o for or; for example to find exactly these permissions, type:
find <location> -type f -perm 744 -o -perm 666
Directories can be searched for with
man find for the other available permutations.