Linux-Noob Forums
Displaying Hard Disk Info. - Printable Version

+- Linux-Noob Forums (https://www.linux-noob.com/forums)
+-- Forum: Linux Noob (https://www.linux-noob.com/forums/forum-3.html)
+--- Forum: Tips and Tricks (https://www.linux-noob.com/forums/forum-59.html)
+--- Thread: Displaying Hard Disk Info. (/thread-3939.html)



Displaying Hard Disk Info. - kZo - 2003-12-16


Quick way to view your hdd stats.

 

 

[root@intmail root]# df -h

 

Filesystem Size Used Avail Use% Mounted on

/dev/md0 73G 2.8G 66G 4% /

none 504M 0 503M 0% /dev/shm

 

 

The -h is for "Human readable" basically tells us GB verse MB etc.

 

[root@intmail root]# df --help

 

This will display more information about the df command.




Displaying Hard Disk Info. - Henry3 - 2009-03-09


Just get my diskinfo script from http://www.thenerdshow.com/index.php?page=installation

 

It lists partitions underneath physical drives, so I don't get confused about which is which.

 

Like its predacessor df, it runs as a normal user. We don't need root. Run with -i for interactive.

 

Here it is called diskinfo but to save typing I secretly rename my copy to dl. [img]<___base_url___>/uploads/emoticons/default_laugh.png[/img]

 

$ diskinfo -i

 

Drive Size Description (Removables are highlighted in blue)

/dev/fd0 Empty /dev/floppy-fd0 platform:floppy disk


/dev/sda 37G ATA SAMSUNG SV4002H

├─/dev/sda1 102M mounted on /boot type ext3


├─/dev/sda2 36G mounted on / type ext3


└─/dev/sda3 1G mounted on swap type swap


/dev/sdb 114G ATA Maxtor 6Y120P0

└─/dev/sdb1 114G

/dev/sr0 Empty /dev/dvdrw3 HL-DT-ST DVD-RAM GSA-H55N