On 6/16/2013 11:48 AM, Lele Gaifax wrote:
Roy Smith <r...@panix.com> writes:

In article <mailman.3442.1371389433.3114.python-l...@python.org>,
  Chris Kwpolska Warrick <kwpol...@gmail.com> wrote:

(I��m using wc -c to count the bytes in all files there are.  du is
unaccurate with files smaller than 4096 bytes.)

It's not that du is not accurate, it's that it's measuring something
different.  It's measuring how much disk space the file is using.  For
most files, that's the number of characters in the file rounded up to a
full block.

I think “du -c” emits a number very close to “wc -c”.

In Windows Explorer, the Properties box displays both the Size and 'Size on disk', in both (KB or MB) and bytes. The block size for the disk I am looking at is 4KB, so the Size on disk in KB is a multiple of that.

--
Terry Jan Reedy


--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to