Debugging Disk space

Engineering Nov 11, 2016

To find top 10 files eating up disk space
-- du -kh |sort -nr |head -10

To find disk space per folder/file in current directory.
-- du -sch .[!.]* * |sort -h

To find deleted files still being accessed by any processes
-- lsof +L1

If df looks fine, yet no files can be added, check inodes.
-- df -i

Number of inodes used can be high, if you've several small files.

When your df -h output goes to next multiple lines and you need some awk filters on positions,

Use df -P. It'll print one liners.

Other lesser used:
-- ncdu

-- du —max-depth=1 -h /

Srujan

You should go to about section on this site.

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.