
One can search SGID files on Linux using the below commandįind / -perm 2644 10. The primary difference is that it inherits permission of the group when running a file rather than the person logged into the system.

Look for SGID File With 644 PermissionĪkin to SUID, SGID (Set Group ID upon execution) is also temporary permission given to a user to run a file or executable. The below command will search for files that have SUID permission 755įind / -perm 4755 9. The SUID (Set owner User ID upon execution) is temporary permission set for a file that permits a user to run executable by inheriting access permission of the executable owner. In this case, it will check all data with the name âtrial.phpâ and has 777 permissions. The command will return all files that have 777 permissions. It checks âtmpâ files that have the file name âfile.php.âįind / -type f -name tmp.php Find Files/Folders by Permissions 7. The command will allow users to find all PHP files with a specific name such as âaskâ in a working directory.įind. For example, the title to search is âputtygen,â then the user has to type the below command.įind / -type d -name puttygen 5. The command searches directories with a specific name such as â puttygenâ in the root folder. Search All Directories for a Particular File Therefore the result will display all results that match the file name.įind /home -iname putty.txt 4. The command seeks to look for all files irrespective of the case, i.e., uppercase or lowercase in the /home directory. Find Files in /Home Directory Regardless of Case Sensitive For example, the below command is to look for the name âputty.txt.âįind /home -name tecmint.txt 3. The command searches the current working directory for the file name âputty.txtâ However if a user wants the â find commandâ to return only files and not the directories then one has to add -type f at the end of the command.įind. Below are examples of the âfindâ command on Linux: Find Files by Name using find command 1. There are several ways one can use the file command to make tasks easier. 7 Run Execute Command on Files That Return With âFindâ Command.File in a Given Time Range (Hours/Minutes)

Search for File Altered Precisely at 90 Days

2 Find Files by Name using find command.1 Examples of the file command in Linux.
