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 [2015/10/12 16:16] billdozor [Find folders with the most files] |
linux_wiki:find [2016/06/12 16:10] billdozor |
||
---|---|---|---|
Line 6: | Line 6: | ||
**Checklist** | **Checklist** | ||
- | * Distro(s): | + | * Distro(s): |
---- | ---- | ||
- | ===== 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 | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ |