Re: Why is there difference between sum sizes of individual files and output by du?
- From: Josef Moellers <josef.moellers@xxxxxxxxxxxxxxxxxxx>
- Date: Wed, 10 Jan 2007 13:05:34 +0100
Prasad wrote:
Hi All,
This is what I have noticed. When I manually add the sizes of
individual files in a directory the sum is different than what is
produced by du on the same directory.
( /home/Prasad/programs/c/lsp/IPC/message_queue/ contains no
directories within)
[Prasad@prasadjoshi my_du]$ ls -al
/home/Prasad/programs/c/lsp/IPC/message_queue/
total 32
drwxrwxr-x 2 Prasad Prasad 4096 Jan 1 18:59 .
drwxrwxr-x 4 Prasad Prasad 4096 Jan 8 18:47 ..
-rw-rw-r-- 1 Prasad Prasad 971 Jan 1 18:59 first_receiver.c
-rw-rw-r-- 1 Prasad Prasad 1505 Jan 1 18:58 first_sender.c
-rwxrwxr-x 1 Prasad Prasad 5642 Jan 1 15:09 rcv
-rwxrwxr-x 1 Prasad Prasad 6115 Jan 1 15:09 send
971 + 1505 + 5642 + 6115 = 14233
14233 / 1024 = 13
[Prasad@prasadjoshi my_du]$ du
/home/Prasad/programs/c/lsp/IPC/message_queue
28 /home/Prasad/programs/c/lsp/IPC/message_queue
Why is there so much of difference?
Educated guess: your version of du prints in units of 512 bytes rather than in units of 1024 bytes, as the standard du would do.
--
Josef Möllers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett
.
- Follow-Ups:
- References:
- Prev by Date: Why is there difference between sum sizes of individual files and output by du?
- Next by Date: Re: questions on Realtek 8139D driver
- Previous by thread: Why is there difference between sum sizes of individual files and output by du?
- Next by thread: Re: Why is there difference between sum sizes of individual files and output by du?
- Index(es):
Relevant Pages
|