Difference between revisions of "Du"
From DevOps Notebook
Line 1: | Line 1: | ||
− | == | + | == Find top 10 largest directories == |
<pre> | <pre> | ||
# du -hs * | sort -rh | head -10 | # du -hs * | sort -rh | head -10 | ||
+ | </pre> | ||
+ | |||
+ | == Exclude from disk usage == | ||
+ | <pre> | ||
+ | # du -ah --exclude="*.txt" /home/devops | ||
+ | </pre> | ||
+ | |||
+ | == Display disk usage based on modification time == | ||
+ | <pre> | ||
+ | du -ha --time /home/devops | ||
</pre> | </pre> |
Latest revision as of 12:20, 7 December 2019
Find top 10 largest directories
# du -hs * | sort -rh | head -10
Exclude from disk usage
# du -ah --exclude="*.txt" /home/devops
Display disk usage based on modification time
du -ha --time /home/devops