Check hard disk size and folder size on Centos 6.3 or RedHat RHEL 6.3

Check hard disk size and folder size on Centos 6.3 or RedHat RHEL 6.3 

 

1. Check hard disk size

[root@Centos6 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 8.6G 5.3G 2.9G 65% /
tmpfs 266M 0 266M 0% /dev/shm
/dev/sda1 291M 31M 245M 12% /boot

2. Check folder size for opt

[root@Centos6 opt]# du -h
1.7M ./atlassian/jira/logs
1.7M ./atlassian/jira
40K ./atlassian/confluence/logs
44K ./atlassian/confluence
1.7M ./atlassian
4.0K ./rh
4.0K ./disk
348M ./Source
350M .

3. Check folder size with printing the total for a directory

[root@Centos6 opt]# du -h –max-depth=1
1.7M ./atlassian
4.0K ./rh
4.0K ./disk
348M ./Source
350M .
[root@Centos6 opt]#

That’s all. Thanks for using IThelpblog.com

 

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>