• sudo find /usr -type f -perm /u=s. ... find /etc -maxdepth 1 -perm /u=r.
  • The predicate -path is also supported by. HP-UX find and is part of the POSIX 2008 standard. - perm mode.
  • find . -perm 754. ... find . -perm u=rwx,g=rx,o=r. Same as the above command, but uses a symbolic representation of the permission bits.
  • Find files in the "/" directory with the "4000" permission and all the errors will stream out the /dev/null so you have a pretty output.
  • 21. Find All Files with 777 Permissions and chmod to 644. $ find / -type f -perm 0777 -print -exec chmod 644 {} \
    • -newer file: search for the file names that are modified after “file”.
    • -perm octal: search for the files if the permission is ‘octal’.
    Linux Find -perm option.
  • find [directory to search] [options] [expression]. ... find -perm mode.
  • So, if we want to find all those files that hold the SUID bit then it can be retrieved by typing the command: find / -perm -u=s -type f 2>/dev/null.
  • To find files based on their set permissions, you will need to use the “-perm” option, followed by the numerical permission.
  • The expression will define how to search and match files and what to do with them. Here you see that find is very powerful and has a lot of options.