Operating System - Linux
1829581 Members
4264 Online
109992 Solutions
New Discussion

Re: how to get size of directory

 
sushb4u
New Member

how to get size of directory

i have a problem regarding file/directory size.....i mean when i run ls -l command in linux.....i get same directory size always....like 4096....even if i put no. of files of large sizes in that directory...it gives the same size....infact it gives same size when u create new directory....is anybody there facing same problem....plz reply if u know something about this...

3 REPLIES 3
Sergejs Svitnevs
Honored Contributor

Re: how to get size of directory

du -sk /

Regards,
Sergejs

Balaji N
Honored Contributor

Re: how to get size of directory

hi
guess what you are seeing is the block size.

to see the size of a directory, use du


du -sh

here
-s is to give a summary
-h, --human-readable
print sizes in human readable format (e.g., 1K 234M 2G)


hth
-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
sushb4u
New Member

Re: how to get size of directory

hi....thanks all for help....ya i was seeing block size....thanx