Find disk space usage on my Linode

Linode Staff

I would like to find the directories on my Linode using the most disk space so that I can get a better idea of where to clean out files.

2 Replies

A a good command to find the top size directories in the current working directory would be

du -Sh | sort -rh | head -5

Once you've found the largest folders, you could use

cd /path/to/directory
ls -la

to get a list of the files in the directory along with the file sizes.

I prefer to use the following command, which finds the top ten directories sorted by disk space usage:
sudo find / -xdev -printf '%h\n' | sort | uniq -c | sort -k 1 -n | tail -n10


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct