ubuntu show top largest directories

Let us talk about scripts, HTML, Perl, PHP, apache, etc.
Post Reply
User avatar
Stevyn
SysOp
Posts: 1585
Joined: Mon Nov 09, 2009 10:03 am
Myspace: http://myspace.com/stevyn303
Location: Japan
Contact:

ubuntu show top largest directories

Post by Stevyn » Thu Aug 30, 2018 7:45 pm

https://serverfault.com/questions/20094 ... nix-ubuntu


I always use syntax like

Code: Select all

du -sm --max-depth=4 /path/i/want/to/drill | sort -nr | head -n 20


max-depth and head parameters can vary, of course, but the above would list 20 biggest directories.


Nov 12 '10 at 8:08
Janne Pikkarainen

update:
what I now use

Code: Select all

du  -h --max-depth=1  /home/forge/ | sort -hr  | head -n 11 > topsites.txt
topsites.txt will contain top 10 website disk hogs
Contact me directly: Ironfeatherbooks (@) gmail.com

Image

User avatar
Stevyn
SysOp
Posts: 1585
Joined: Mon Nov 09, 2009 10:03 am
Myspace: http://myspace.com/stevyn303
Location: Japan
Contact:

Re: ubuntu show top largest directories

Post by Stevyn » Sat Dec 29, 2018 11:03 am

Code: Select all

df -h
disk space in human readable format
Contact me directly: Ironfeatherbooks (@) gmail.com

Image

Post Reply