How to check disk usage and find large files on Linux

Answered
Jan 05, 2026 1213 views 1 answers
7

My server disk is getting full. How can I find which files and directories are taking up the most space?

W
Platinum 285 rep

1 Answer

27

Check overall disk usage

# Human-readable disk usage
df -h

# Show only local filesystems
df -hl

Find large files and directories

# Find top 10 largest directories
du -h --max-depth=1 / | sort -hr | head -10

# Find files larger than 500MB
find / -type f -size +500M -exec ls -lh {} \;

# Interactive disk usage analyzer
sudo apt install ncdu
ncdu /
P
Answered by python_dev 1 week, 2 days ago
Platinum 447 rep

Your Answer

You need to be logged in to answer questions.

Log In to Answer

Hot Questions

No hot questions available.