
$ man findĪlso, check the man pages alternatives to learn more simplified examples of any Linux command. These two commands does the same job as "find -perm /220" command.įor more details, refer the man pages. To find files which are writable by either their owner or their group, run: $ find -perm /u+w,g+w The above command is equivalent of "find -perm -220" command. To find files which are writable by both their owner and their group, use this command: $ find -perm -g+w,u+w To limit the search to a specific directory such as /usr: find /usr -name filename.txt -print. Recent operating system versions do not require the print option because this is the default. To find a file such as filename.txt anywhere on the system: find / -name filename.txt -print. To find any file which are writable by all (the file owner, group and everyone else), run: $ find -perm -a=w Using the find command, one can locate a file by name. To find any file which are writable by the file owner, run: $ find -perm -u=w For example, the following two commands will do the same thing. Please note that you can use either "=" or "+" operators for symbolic notation. This command will find the files with permission of exactly 777 in the current directory.įind files based on their permissions using symbolic notationĪs you see in the above example, file1 and file2 have group write permission. Now let me run the following command: $ find -perm 777

Find files based on their numeric (octal) permissions


etc) or symbolic permission (like u=x, a=r+x). The MODE can be either with numeric or octal permission (like 777, 666. The typical syntax to find files based on their permissions is: $ find -perm mode Now let us find the files based on their permissions.
