Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

How to check which directory used up most of the disk space?

Answer:

For example, assume you are at /usr/local, you want to generate a report on disk space usage on all the sub directories, you can use the following command

# du -k * | sort -n

.
.
14564   share/man/man3
14816   share/man
16624   share/perl/5.10.0
16628   share/perl
33060   share

It will give you a very clear and useful report.

  1. MySQL binary log files take all of my disk space
  2. Exclude files when using the du to estimate disk usage
  3. How to check the amount of free space in a server?
  4. How to enable Direct memory access (DMA) on your SATA/IDE hard disk
  5. How to find a Perl Module’s Path

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>