Centos 6.5 directory size is incorrect using du command

I 'm running the du command on one of my websites directories and I'm getting 2 different result, I'm confused which one is accurate and why there is a big difference, here both command and the output.

du -hsc directory_name/
5.3G    directory_name/
5.3G    total

du -hsc directory_name/*
4.0K    directory_name/announcements.php
4.0K    directory_name/articles.php
1.2M    directory_name/election2011
4.3M    directory_name/error_log
78M directory_name/files
3.0G    directory_name/php
3.1G    total
  • du command, Centos
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

Allow root account to use SSH (openssh)

Q. Previous admin blocked root access to ssh server. How do I allow root account access to ssh...

Under any linux system, you want to use the command du. (Disk Usage)

Common usage is : du -sh file(s) name(s) or du -sh /path/to/dir/* Replace 'h' by 'k','m' or 'g'...