LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   disk space calculation (https://www.linuxquestions.org/questions/linux-general-1/disk-space-calculation-563703/)

tostay2003 06-22-2007 09:07 AM

disk space calculation
 
Strangely I see two values, with two different ways,

lets say I have PATH_A

with Directory_A
& Directory _B

I want to know the size of Directory_A
First Way
When I say

ls -l PATH_A

it gives size of 335872 for Directory_A ( converting to MB i.e dividing by 1024 twice = approx 0.32MB)

Second Way
when I say

du -k -s PATH_A/Directory_A

I get

113127 [converting to MB i.e. divinding by 1024 once = approx 110MB ]

Simon Bridge 06-22-2007 09:35 AM

That's right, they are measuring different things.
http://lists.freebsd.org/pipermail/f...ly/051385.html

tostay2003 06-22-2007 10:07 AM

My case is reverse

du -k -s gives 110MB
ls -l gives 0.3MB

XavierP 06-22-2007 12:53 PM

Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.


All times are GMT -5. The time now is 08:20 PM.