Finding Large Directories on Ubuntu
A very quick and dirty way to find large directories, e.g. when out of disk space on an ubuntu server is this:
du -h --max-depth=1 /folder1/folder2
And then just drilling down, e.g. if folder3
shows up as being the largest folder in the output of the above command then do
du -h --max-depth=1 /folder1/folder2/folder3
You can also sort it if you remove -h
and then pipe to sort -n
e.g.
du -h --max-depth=1 /folder1/folder2 | sort -n
But haven't yet got that to work nicely with humanised file sizes (e.g. showing in M/G instead of bytes).