How to list file space usage estimate (du), SPECIFIED BY RANGE
Morning,
My server disk storage is running out. I know I can see all sub dir disk usage using du -h. But the outcome of this command is too lengthy because there are a lot of subdir under my parent dir. I just want to specifically list all subdir under a dir, with dir size greater than 5M, maybe. Is this possible? Thx, Tsi Lok |
du -kh | sort -nr | less
|
du -h --max-depth=1
|
1. cd into the dir.
2. du -sh * This doesn't show hidden files, so du -sh .* to show them. Notice the dot(.)? |
Dear all,
Thx for the solutions but all are still unable to allow me to filter the outcome by size. Anyway, your solutions have eased my work. Thx a bunch =) |
Re: How to list file space usage estimate (du), SPECIFIED BY RANGE
Quote:
Code:
#!/bin/bash Code:
sizeme.sh /home/foo/* Benjamin |
Thx Benji =)
Yipe, just wat I needed! |
All times are GMT -5. The time now is 03:18 AM. |