Skip to content

Linux : Check files & directories size

i think this is common problem after development phase, yes, server disk space… usually a developer having problem with this kind issue, especially if your web files hosted on cheap hosting with small disk capacity :D…anyway, straight to the point, this is linux commands how to check file & directory size

to list files size use this command :

>ls -lah

here example results

drwxr-xr-x 2 root root 4.0K 2012-10-18 07:29 sudoers.d
-rw-r–r– 1 root root 2.1K 2010-12-21 04:56 sysctl.conf
drwxr-xr-x 2 root root 4.0K 2011-04-29 21:39 sysctl.d

to list directories size use this command :

du -sh *

the results will be like this:

12K captcha
33G catalog
4.0K css
4.0K css_secure
8.0K customer
16K dhl
8.0K downloadable

Share

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.