Something I’m always curious about is where my disk space always goes. Honestly, it’s amazing how quickly you can fill up a hard drive these days. Linux has a great tool called ‘du’ (disk usage) that we can leverage to see where all our GB are escaping to.

There’s a few flags you’ll want to use before you just go and start using ‘du’ only.

Navigate to the directory you would like to check up on, in this case, my web server root:

$ cd /var/www/
$ du --max-depth=1 -h
58M	./www.chriskdesigns.com
32M	./stock_wordpress
17M	./www.binbash.in
106M	.

So I’m using 106MB of disk space with websites currently. This can be extremely useful with large media sites.

Let’s look at those flags:

--max-depth=1 - Tells us to only look at the current directory and the folders in it, not recursively
-h - 'Human Readable', so you'll get things like 10M or 54G

For all the flags hit up the man pages with:

$ du man

Posted by Chris Klosowski

Chris Klosowski is the Director of Technology at Sandhills Development, LLC, creators of fine WordPress plugins, and ecommerce solutions.

3 Comments

  1. That is very fascinating, You are an excessively skilled blogger.

    I have joined your rss feed and sit up for in search of more of your great post.
    Additionally, I have shared your site in my social networks

    Reply

  2. hello!,I like your writing so much! percentage we be in contact extra approximately your article on AOL?
    I require a specialist in this house to
    resolve my problem. May be that’s you! Looking forward to
    look you.

    Reply

  3. WOW just what I was looking for. Came here by searching for website

    Reply

Leave a reply

Your email address will not be published. Required fields are marked *