« Back to File systems: Frequently Asked Questions

How to find writable files

If you are looking for files or their permissions, then the find command has you covered. Let’s have a look how to find files that are writable by a user, group, or others.

Find all writable files

We can use the -perm option to see what files have a specific set of file permissions. To match one of the three selectors (user, group, other), we can use a slash.

find . -perm /222

This command will search in the current directory and any file that is writable, will show up.

Writable files by others

Want to find only the files that are writable by others? Then set the first two selector to zero, so that the matching happens on the ‘other’ only.

find . -perm /002

The alternative notation for this command is:

find . -perm /o=w

This type of notation might be easier to read. Want to combine? Sure!

find . -perm /g=w,o=w

Learn more about find

This article uses the find command to achieve its tasks. For this popular tool there is a cheat sheet available!

» Mastering the tool: find

find cheat sheet

Other questions related to Linux file systems

Feedback

Is the described answer not working or incorrect, got another tip or question? Share your thoughts!