[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Support bytesize comparison in sort
From: |
Paul Eggert |
Subject: |
Re: Support bytesize comparison in sort |
Date: |
Wed, 31 May 2006 10:29:30 -0700 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) |
Mart Somermaa <address@hidden> writes:
> I've never encountered such behaviour and IMHO it should be considered a
> bug (considering both the expectations of users and the column widths in
> 'du -h' and 'df -h'). Can you provide a test case?
It's not a bug. Here's a test case.
The size of 'big' is 2**40 - 2**30 bytes, and 'bigger' is one byte bigger.
$ ls -l big bigger
-rw-rw-r-- 1 eggert faculty 1098437885952 2006-05-31 10:20 big
-rw-rw-r-- 1 eggert faculty 1098437885953 2006-05-31 10:20 bigger
$ du -h --apparent big bigger
1023G big
1.0T bigger
Also, I'm still leery of assuming properly scaled input.
Is it that much harder to implement it correctly without that assumption?