Quote:
|
Is the licenses directory not 800KiB?
|
Of course not - check out the contents.
4.0K ./licenses/ccsa.txt
20K ./licenses/gnugplv2.txt
668K ./licenses/gplvseula.pdf
104K ./licenses/vista-eula.pdf
4+20+668+104=796K
... do you suspect that the missing 4K is the space used by the directory itself?
(rt-click on licences and select "properties" and I see it listed as 779.2K ... remeber, there is rounding to consider with du.)
But you were comparing du with ls
Code:
simon@errata:~/projects/tutorial$ ls -l licenses
total 796
[snip]
See?
Quote:
|
Yea, thanks for your help. So there is no standard way to figure this out?
|
I think the thing to ask here is "what are you trying to achieve?"
Presumably you could write a script to get the size of regular files only out of an ls output and then add them, but why would you want to?
du will tell you how much disk space a given directory occupies if you have restricted space in your account, and ls will tell you how big the files are if you want to move them to another media and you want to know if they will fit.