Hard Drive and Disk Management
Disk Space of all files and directories in the current directory you are located in
du
 Â
 Â
root@localhost agi-bin]# du
132 ./.svn/text-base
4Â Â ./.svn/props
4Â Â ./.svn/tmp/text-base
4Â Â ./.svn/tmp/props
4Â Â ./.svn/tmp/prop-base
16Â ./.svn/tmp
24Â ./.svn/prop-base
188 ./.svn
24Â ./areminder/.svn/text-base
4Â Â ./areminder/.svn/props
4Â Â ./areminder/.svn/tmp/text-base
4Â Â ./areminder/.svn/tmp/props
4Â Â ./areminder/.svn/tmp/prop-base
16Â ./areminder/.svn/tmp
12Â ./areminder/.svn/prop-base
68Â ./areminder/.svn
92Â ./areminder
48Â ./enc
8Â Â ./calllimit
804 .
[root@localhost agi-bin]#
 Â
# Adding the -h flag will have the Disk Size printed out in human readable format
[root@localhost agi-bin]# du -h
132KÂ Â Â ./.svn/text-base
4.0KÂ Â Â ./.svn/props
4.0KÂ Â Â ./.svn/tmp/text-base
4.0KÂ Â Â ./.svn/tmp/props
4.0KÂ Â Â ./.svn/tmp/prop-base
16K ./.svn/tmp
24K ./.svn/prop-base
188KÂ Â Â ./.svn
24K ./areminder/.svn/text-base
4.0KÂ Â Â ./areminder/.svn/props
4.0KÂ Â Â ./areminder/.svn/tmp/text-base
4.0KÂ Â Â ./areminder/.svn/tmp/props
4.0KÂ Â Â ./areminder/.svn/tmp/prop-base
16K ./areminder/.svn/tmp
12K ./areminder/.svn/prop-base
68K ./areminder/.svn
92K ./areminder
48K ./enc
8.0KÂ Â Â ./calllimit
804KÂ Â Â .
[root@localhost agi-bin]#
 Â
# If we wanted to know how much space the voicemail directory is using we can use the following command
[root@localhost agi-bin]# du -h /var/spool/asterisk/voicemail/
4.0KÂ Â Â /var/spool/asterisk/voicemail/device
8.0KÂ Â Â /var/spool/asterisk/voicemail/
[root@localhost agi-bin]#
 Â
# Find which directory is using up the most storage space in /var/spool/asterisk
[root@localhost ~]# cd /var/spool/asterisk/
[root@localhost asterisk]# du -cks * | sort -rn
52Â Â Â total
20Â Â Â sysadmin
8Â Â Â voicemail
4Â Â Â tmp
4Â Â Â system
4Â Â Â outgoing
4Â Â Â monitor
4Â Â Â meetme
4Â Â Â fax |
Â
Disk Space of the entire Hard DriveÂ
df
 Â
 Â
[root@localhost agi-bin]# df
Filesystem          1K-blocks     Used Available Use% Mounted on
/dev/sda2Â Â Â Â Â Â Â Â Â Â Â Â 56818996Â Â 3078276Â 50854424Â Â 6% /
tmpfs                 1952500        0  1952500  0% /dev/shm
/dev/sda1Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 99150Â Â Â Â 25896Â Â Â Â 68134Â 28% /boot
[root@localhost agi-bin]#
 Â
# Adding the -h flag will have the Disk Size printed out in human readable format
[root@localhost agi-bin]# df -h
Filesystem           Size Used Avail Use% Mounted on
/dev/sda2Â Â Â Â Â Â Â Â Â Â Â Â Â 55GÂ 3.0GÂ Â 49GÂ Â 6% /
tmpfs                1.9G    0 1.9G  0% /dev/shm
/dev/sda1Â Â Â Â Â Â Â Â Â Â Â Â Â 97MÂ Â 26MÂ Â 67MÂ 28% /boot
[root@localhost agi-bin]# |
Â
Unable to render {include} The included page could not be found.