There are times I'm over or near my quota on my shared hosting service. It can often be a chore to track down where large files are. I once found a 500mb zip file in a deeply nested directory.

I'm looking for a Linux command, where I can see how much space each directory and nested subdirectories (in the directory tree) are using, sorted in order of disc space use.

I'm unable to get the results I need with variants of the df and du commands. Thanks


Try something like:

du -s * | sort -n
  • worked! found a giant log.txt file. Baffled where this came from – user2398188 May 27 '13 at 22:59

Check out ncdu. Interactive disk space viewer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.