How to check the current disk space used by my linux?

6

4

The entire box. How many gigs is everything using?

And how do I check total?

Alex

Posted 2009-11-16T06:04:42.847

Reputation: 1 751

Answers

16

At a command line, type

df -a

This will list each device and usage information.

You might find

df -h

more readable, since it gives quantities in Gb or Mb, etc.

pavium

Posted 2009-11-16T06:04:42.847

Reputation: 5 956

9

As suggested by others, du and df can easily do the job, but baobab (see screenshot below) is a great tool for analysing disk usage of whole file system or specific folders.

If you are using ubuntu, then baobab is already installed. Start it from Menu->Accessories->Disk Usage Analyzer or type baobab in a terminal window.

alt text

mrucci

Posted 2009-11-16T06:04:42.847

Reputation: 8 398

3

Here are some approaches:

df -h

Or install the totally awesome kdirstat graphical utility:

alt text

DigitalRoss

Posted 2009-11-16T06:04:42.847

Reputation: 2 968

Is this based on WinDirStat, or is it the other way around? – Marcin – 2009-11-16T10:12:31.000

Actually, kDirStat came first, something the kDirStat folks are rather sensitive about. (Apparently most people just assume the win version same first. :-) – DigitalRoss – 2009-11-16T17:32:07.130

2

du . -h --max-depth=1 

lists the size of all the folders in the current directory (or at a location of your choice)

artifex

Posted 2009-11-16T06:04:42.847

Reputation: 426

1

df -h

SleighBoy

Posted 2009-11-16T06:04:42.847

Reputation: 2 066

1

du -sh folder  

tells you how much folder is taking space. You can list multiple directories at once or use *.

df -h  

tells you the total space of each mount point.

You can omit h (human readable) from both if you want to know the exact amounts.

joukokar

Posted 2009-11-16T06:04:42.847

Reputation: 11

1

There is also ncdu:

Not quite happy with the available disk usage analyzers and looking for a fun project to get used to C programming, I started working on ncdu: A disk usage analyzer with an ncurses interface, aimed to be run on a remote server where you don't have an entire gaphical setup, but have to do with a simple SSH connection. ncdu aims to be fast, simple and easy to use, and should be able to run in any minimal POSIX-like environment with ncurses installed.

geek

Posted 2009-11-16T06:04:42.847

Reputation: 7 120

0

Dan Breen

Posted 2009-11-16T06:04:42.847

Reputation: 101

du by itself gives disk usage for the current directory – pavium – 2009-11-16T06:13:28.377