Title: Linux Command To Find How Much Disk Space Is Being Used Show Display
Description: linux command to find how much disk space is being used show display Linux Hosting
Tags: linux, command, to, find, how, much, disk, space, is, being, used, show, display
Info: This Post Has Been Viewed 32703 Times SinceSat Jan 13, 2007 5:14 pm Author pinguin With 7 Replies #713

Linux Command To Find How Much Disk Space Is Being Used Show Display

a simple linux shell command to show you how much space a directory is using is helpful in maitaining a good disk managment. Lately i wanted to find out how much space i had left in my dedicated server, well to display or to show how much is being used, this is the command you can send:

NOTE: you must be logged in as root


     Code:
cd /



     Code:
du -hc --max-depth=1


this will show you something like this:

     Code:
[root@hostname /]# du -hc --max-depth=1
0 ./net


1.6G ./usr
16K ./lost+found
515M ./proc
8.0K ./misc
648M ./var
112K ./dev
8.0K ./mnt
66M ./lib
8.0K ./selinux
7.3M ./bin
77M ./root
4.2M ./boot
28K ./tmp
2.7M ./backups
20M ./sbin
8.0K ./media
8.0K ./srv
0 ./sys
43M ./etc
42M ./home
8.0K ./opt
3.0G .
3.0G total


and addition, you could also use these commands to show you disk space being use by your sytem on the linux or unix shell command:


     Code:
cd /
df -H
or

     Code:
cd /
df -sh *


you will see something like this:

     Code:
[root@hostname/]# df -H
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
387G 2.1G 365G 1% /
/dev/hda1 104M 11M 89M 11% /boot
tmpfs 265M 0 265M 0% /dev/shm
Comments (7)
View Top Comments
Leave Your Comments...
#1
lili:
5 years ago
#945
lili Mon Mar 19, 2007 11:37 pm
good one good one good one
#2
thanig:
4 years ago
#24713
thanig Thu Oct 18, 2007 5:33 am
got a spelling issue:
your sytem

otherwise, helpful.
#3
Lantay77:
3 years ago
#90597
Lantay77 Mon Jan 19, 2009 8:08 am
thanks a bunch!

lantay77 - my personal portfolio
trayiel - flash based mmorpg!
#4
Niket:
1 year ago
#146685
Niket Thu Oct 28, 2010 9:19 pm
This u have shown the disk space usage. Please let me know the command (in linux) for 'how much space i have left with in my system/server'.

Thanks in advance...
#5
Christopher:
1 year ago
#151926
Christopher Fri Feb 04, 2011 6:09 am
Niket, df -h will show available disk space across each drive.
#6
bla:
1 month ago
#177244
bla Mon Feb 27, 2012 8:02 pm
...you looks like guru
#7
Ben:
9 seconds ago
#181079
Ben Tue Apr 17, 2012 4:22 am
what if you want to know how much space is being used by each person on your system?
Leave Your Comments...
Share
| More