Differences
This shows you the differences between two versions of the page.
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 " | Some of the useful find commands that have been " | ||
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 / | 2123 / | ||
</ | </ | ||
+ | |||
---- | ---- | ||
+ | |||
+ | ===== Find, starting in /, all files (type f) owned by rjones ===== | ||
+ | |||
+ | <code bash> | ||
+ | find / -user rjones -type f | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Remove all files owned by rjones ===== | ||
+ | |||
+ | <code bash> | ||
+ | find / -user rjones -type f -exec rm ' | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Find all files modified in the last 3 days ===== | ||
+ | |||
+ | <code bash> | ||
+ | find / -mtime -3 -type f | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ |