I get the underneath result from the disk usage (du) command: linux SuSE $ du -bs 8.2-i386 (which is report bits) 55466325 8.2-i386 linux SuSE $ du -hs 8.2-i386 86M 8.2-i386 linux SuSE $ du -ks 8.2-i38 87524 8.2-i386 linux SuSE $ du -s 8.2-i386 87524 8.2-i386 while awk reports something around 60M: ls -l | awk '{totaal+=$5}END{print totaal}' 54381460 linux01:3 23:54:50 /ftp/pub/linux/suse/apt/SuSE $ find 8.2-i386 -type l | xargs ls -l | awk '{totaal+=$5}END{print totaal}' 667073 So I would expect a du figure of around 55M => the other output from du does not seem right? What's going on? -- Richard Bos Without a home the journey is endless
On Sun, 2003-08-03 at 00:15, Richard Bos wrote:
I get the underneath result from the disk usage (du) command: linux SuSE $ du -bs 8.2-i386 (which is report bits) 55466325 8.2-i386
-bs is BS :) It reports "apparent size", which isn't always the same as the actual used size on the disk
linux SuSE $ du -hs 8.2-i386 86M 8.2-i386
linux SuSE $ du -ks 8.2-i38 87524 8.2-i386
linux SuSE $ du -s 8.2-i386 87524 8.2-i386
These numbers are probably correct
while awk reports something around 60M: ls -l | awk '{totaal+=$5}END{print totaal}' 54381460
linux01:3 23:54:50 /ftp/pub/linux/suse/apt/SuSE $ find 8.2-i386 -type l | xargs ls -l | awk '{totaal+=$5}END{print totaal}' 667073
I'm not entirely sure what you're doing here (what are the symbolic links?), but note that the disk usage of a file is not the same as the number of bytes in that file, especially not if you're using a block based file system like ext2 or 3. The more files you have, the greater the discrepancy
Op zondag 3 augustus 2003 00:28, schreef Anders Johansson:
On Sun, 2003-08-03 at 00:15, Richard Bos wrote:
I get the underneath result from the disk usage (du) command: linux SuSE $ du -bs 8.2-i386 (which is report bits) 55466325 8.2-i386
-bs is BS :) It reports "apparent size", which isn't always the same as the actual used size on the disk
linux SuSE $ du -hs 8.2-i386 86M 8.2-i386
linux SuSE $ du -ks 8.2-i38 87524 8.2-i386
linux SuSE $ du -s 8.2-i386 87524 8.2-i386
These numbers are probably correct
while awk reports something around 60M: ls -l | awk '{totaal+=$5}END{print totaal}' 54381460
linux01:3 23:54:50 /ftp/pub/linux/suse/apt/SuSE $ find 8.2-i386 -type l | xargs ls -l | awk '{totaal+=$5}END{print totaal}' 667073
I'm not entirely sure what you're doing here (what are the symbolic links?), but note that the disk usage of a file is not the same as the number of bytes in that file, especially not if you're using a block based file system like ext2 or 3. The more files you have, the greater the discrepancy
Thanks Anders. There are just a couple of thousand links in that directory consuming space as well. Okay the difference is as you say: the disk usage of a file is not the same as the number of bytes in that file. I don't know the filesystem, but I assume it is reiserfs. -- Richard Bos Without a home the journey is endless
participants (2)
-
Anders Johansson
-
Richard Bos