User Tools

Site Tools


bash:find:find_files_based_on_their_permissions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
bash:find:find_files_based_on_their_permissions [2022/06/13 08:46] peterbash:find:find_files_based_on_their_permissions [2022/06/13 08:59] (current) peter
Line 43: Line 43:
  
 <WRAP info> <WRAP info>
-**NOTE:**  This displays two files.+**NOTE:**  This will find all files where the file owner has read/write/execute permissions, file group members have read/write permissions and everything else has also read/write permission.
  
-We have set 766 permission to file2, but this command displays two files, why?+  * Yes, it will display files which do have 766 permissions.
  
-  * Because, here we have used a “-” prefix”. +  * But this may also display some files which do not have exact 766 permissions. 
-    * It means that this command will find all files where the file owner has read/write/execute permissions, file group members have read/write permissions and everything else has also read/write permission. +    * This could include files with tighter permissions too.
- +
-  * In our case, file1 and file2 have met this criteria. In other words, the files need not to have exact 766 permission It will display any files that falls under this 766 permission.+
  
 </WRAP> </WRAP>
Line 88: Line 86:
 ===== Find Files Based On their Permissions using symbolic notation ===== ===== Find Files Based On their Permissions using symbolic notation =====
  
-In the following examples, we use symbolic notations such as u ( for user), g (group), o (others).+Symbolic notations is used such as u (for user), g (group), o (others).
  
-  We can also use the letter **a** to represent all three of these categories.+<WRAP info> 
 +**NOTE:**  
 + 
 +  * The letter **a** can be used to represent all three of these categories.
   * The permissions can be specified using letters r (read), w (write), x (executable).   * The permissions can be specified using letters r (read), w (write), x (executable).
  
-For instance, to find any file with group write permission, run:+</WRAP> 
 + 
 +---- 
 + 
 +==== To find any file with group write permissions ====
  
 <code bash> <code bash>
Line 99: Line 104:
 </code> </code>
  
-As you see in the above example, file1 and file2 have group write permission.+<WRAP info> 
 +**NOTE:**  You can use either **“=”** or **“+”** for symbolic notation.
  
-Please note that you can use either **“=”** or **“+”** for symbolic notation. It does not matter.+  * It does not matter. 
 + 
 +</WRAP>
  
 For example, the following two commands will do the same thing. For example, the following two commands will do the same thing.
Line 110: Line 118:
 </code> </code>
  
-To find any file which are writable by the file owner, run:+---- 
 + 
 +==== Find any file which are writable by the file owner ====
  
 <code bash> <code bash>
Line 116: Line 126:
 </code> </code>
  
-To find any file which are writable by all (the file owner, group and everyone else):+---- 
 + 
 +==== Find any file which are writable by all (the file owner, group and everyone else) ====
  
 <code bash> <code bash>
Line 122: Line 134:
 </code> </code>
  
-To find files which are writable by both their owner and their group:+---- 
 + 
 +==== Find files which are writable by both their owner and their group ====
  
 <code bash> <code bash>
Line 133: Line 147:
  
  
-To find files which are writable by either their owner or their group, run:+---- 
 + 
 +==== Find files which are writable by either their owner or their group ====
  
 <code bash> <code bash>
Line 145: Line 161:
 </code> </code>
  
-<WRAP center round info 60%>+<WRAP info>
 **NOTE:**  These two commands do the same job as the **find -perm /220** command. **NOTE:**  These two commands do the same job as the **find -perm /220** command.
 </WRAP> </WRAP>
  
 ---- ----
 +
 +===== Help =====
  
 For more details, refer the man pages. For more details, refer the man pages.
Line 157: Line 175:
 </code> </code>
  
-Also, check the man pages alternatives to learn more simplified examples of any Linux command.+
  
bash/find/find_files_based_on_their_permissions.1655109972.txt.gz · Last modified: 2022/06/13 08:46 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki