Thursday 1 October 2009

How to Check Disk space in Linux

ref : http://sysdigg.blogspot.com/2008/03/how-to-check-disk-space-in-linux.html
How to Check Disk space in Linux

For Linux beginners sometimes it's very hard for them to perform simple administration tasks like check available disk space. I know some Windows folks at my work who tried to get their hands into Linux so they installed Fedora 8 on PC. But soon they realized that they couldn't do some basic tasks like check free disk space, sharing directories, configuring printers etc etc to name a few. Checking disk space I Linux is not very difficult in Linux .There are two ways to check disk space in Linux

* Check disk space in Linux using command line
* Check disk space in Linux by using Graphical tool if you have some sort of graphical desktop installed.

Check disk space using command line in Linux:

Open command terminal

window if you are running Graphical windows manager. If you don't know how to open

command terminal window see how

Run df –h , UNIX friendly way is to run df –k but if want disk

space displayed in Megs and Gigabytes then use df –h :

[root@fedoradev]# df -h

Filesystem Size Used

Avail Use% Mounted on

/dev/mapper/vgroot-lvroot

20G 12G 7.2G 62% /

/dev/cciss/c0d0p1 97M 16M 76

M 18% /boot

none 2.0G 0 2.0G 0% /dev/shm

/dev/mapper/vgdata-lvdata 22G 62G 245G 21% /data

Check disk space in Linux using GUI:

From command line run command:

[root@fedoradev # baobab &

OR

From desktop Select Systems Tools from Applications and then select Disk usage analyzer, this will launch a GUI window.

Select Filesystem icon

if you want to check the disk space for the file systems or select Folder icon if you want to see disk space for each and every directory on your Fedora machine

No comments: