Home Download Ubuntu

How to see hard disc space in Ubuntu

1. Using df command

df -h


As my hard drive is 2Gb, it will look like this:

Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu-root
1.6G 802M 746M 52% /
udev 249M 196K 249M 1% /dev
none 249M 0 249M 0% /dev/shm
none 249M 244K 249M 1% /var/run
none 249M 0 249M 0% /var/lock
none 249M 0 249M 0% /lib/init/rw
/dev/sda5 228M 14M 202M 7% /boot


2. Using Discus

Discus is a GPL text-mode disk space usage program. Discus aims to make df prettier. Features include color, bar graphs, and smart formatting of numbers (automatically choosing the most suitable size from kilobytes, megabytes, gigabytes, or terabytes). Or choose your own size, along with specifying the number of decimal places.

If you don't have discus:

sudo apt-get install discus


And we run it:

sudo discus


Output:

Mount           Total         Used         Avail      Prcnt      Graph
/ 1.59 GB 801.8 MB 828.1 MB 49.2% [*****-----]
/sys 0 KB 0 KB 0 KB 0.0% [----------]
+onnections 0 KB 0 KB 0 KB 0.0% [----------]
+rnel/debug 0 KB 0 KB 0 KB 0.0% [----------]
+l/security 0 KB 0 KB 0 KB 0.0% [----------]
/dev 248.7 MB 196 KB 248.5 MB 0.1% [----------]
/dev/shm 248.7 MB 0 KB 248.7 MB 0.0% [----------]
/var/run 248.7 MB 272 KB 248.4 MB 0.1% [----------]
/var/lock 248.7 MB 0 KB 248.7 MB 0.0% [----------]
+ib/init/rw 248.7 MB 0 KB 248.7 MB 0.0% [----------]
/boot 227.9 MB 13.9 MB 213.9 MB 6.1% [*---------]


Discus command lines:

-h, --help Show summary of options.

-c Disable color.

-d Display device names instead of graphs.

-p Number of digits to right of decimal place.

-s Do not use smart formatting.

-t, -g, -m, -k Display sizes in terabytes, gigabytes, megabytes, or kilobytes, respectively. Assumes -s.

-v, --version Show version of program.

Resources: DebianAdmin.com

0 comments:

Post a Comment