How to Find Files with Specific Permission Settings in unix ?

The UNIX administrator needs to know how to find files with specific security settings. Here are a few examples of the find command.

1. Find all SetUID files in and under the current working directory (.).

% find . -type f -perm -4000 -print

2. Find all SetGID files in and under the current working directory (.).

% find . -type f -perm -2000 -print

3. find all world-writable files in and under the current working dir- ectory (.).

% find . -type f -perm -o+w -print

This entry was posted in Aix, HP-UX, Linux, Solaris. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*


× 4 = twenty four

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>