linux_wiki:find

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux_wiki:find [2016/03/18 23:21]
billdozor [Find]
linux_wiki:find [2019/05/25 23:50] (current)
Line 10: Line 10:
 ---- ----
  
-===== General Syntax =====+====== General Syntax ======
  
 The general syntax of find is: The general syntax of find is:
Line 26: Line 26:
 ---- ----
  
-===== Find Examples =====+====== Find Examples ======
  
 Some of the useful find commands that have been "tested in production". Some of the useful find commands that have been "tested in production".
Line 32: Line 32:
 ---- ----
  
-==== Find folders with the most files ====+===== Find folders with the most files =====
  
 If you run into a situation in which you have high inode usage as seen by 'df -i', the following syntax will show folders with the most files: If you run into a situation in which you have high inode usage as seen by 'df -i', the following syntax will show folders with the most files:
Line 59: Line 59:
    2123 /usr/share/linuxmint/mintinstall/icons    2123 /usr/share/linuxmint/mintinstall/icons
 </code> </code>
 +
 ---- ----
 +
 +===== Find, starting in /, all files (type f) owned by rjones =====
 +
 +<code bash>
 +find / -user rjones -type f
 +</code>
 +
 +----
 +
 +===== Remove all files owned by rjones =====
 +
 +<code bash>
 +find / -user rjones -type f -exec rm '{}' \;
 +</code>
 +
 +----
 +
 +===== Find all files modified in the last 3 days =====
 +
 +<code bash>
 +find / -mtime -3 -type f
 +</code>
 +
 +----
 +
  • linux_wiki/find.txt
  • Last modified: 2019/05/25 23:50
  • (external edit)