Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#1243 closed bug (invalid)

Inconsistent reporting of file sizes. File size reported by Tracker differs from that of 'ls' on terminal.

Reported by: bouncer Owned by: axeld
Priority: normal Milestone: R1
Component: - General Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

1) Click on some folder - which contains some substantial sized files. 2) Use a Terminal to 'cd' to that same directory and do 'ls -l'. Example: Under Tracker a file is reported as having a size of "48.46 KB".

Under 'ls' - the same file is reported as being 59620 bytes.

I believe the inconsistency should not be tolerated.

PS: I think its just a question of Tracker reporting in 'KB' where the 'K' is 1024 bytes. While the 'ls' command is reporting a straight decimal number.

Attachments (1)

Inconsistencies Clip (154.7 KB ) - added by bouncer 17 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 by jackburton, 17 years ago

Window's calculator says 59620 / 1024 = 58,22265625. So it's not just the KB/Byte problem.

comment:2 by jonas.kirilla, 17 years ago

Could it be that Tracker is somehow using 49620 / 1024, which is roughly 48.46 (48.457031) ?

comment:3 by jonas.kirilla, 17 years ago

If you cat the file to wc, what does it say?

comment:4 by jackburton, 17 years ago

By the way, I tried with some files and I can't reproduce this. Tracker and ls report the same size (Tracker's Get Info not only shows the size in KB but also in Bytes, so you can compare them easily).

comment:5 by bonefish, 17 years ago

I assume the second number in the summary simply is a typo and should read 49620. Then, as Jonas calculated, both values exactly fit. I believe bouncer was simply referring to the fact, that one figure is in KB while and the other in bytes. Personally I don't see a problem with this. The shell isn't intended to be used by the average desktop user anyway. I'd suggest to close this ticket.

comment:6 by axeld, 17 years ago

Resolution: invalid
Status: newclosed

comment:7 by bouncer, 17 years ago

One last chance to show what I am talking about:

When two displays - of the same file - present the same value differently - I call that an inconsistency. 'I' know whats going on. But there will eventually be users who do not. I am attaching an image of what I am talking about.

If you want say this is a 'feature' and not really a problem - then OK. I can leave it at that.

by bouncer, 17 years ago

Attachment: Inconsistencies Clip added

comment:8 by jonas.kirilla, 17 years ago

There are many more inconsistencies, like how the filesystems are presented, how root / is unreachable from Tracker, /boot/var/tmp is hidden and /boot/home/Desktop is presented as your GUI root window (aka desktop) where also other things, like your mounted volumes, seem to be mounted, whereas they are in truth mounted at /something.

There are many strange things in the CLI shell that most people without experience are likely to not understand at first. As expected. The CLI is there as a power tool for experienced users and of course for scripts and applications. It's not meant for casual or inexperienced users. Most people using Haiku should never have to use Terminal, but it needs to be there. The shell is part of the Haiku whole and can't easily be removed.

comment:9 by jonas.kirilla, 17 years ago

Perhaps I should clarify that the inconsistencies I mentioned are by design, and thus expected.

Note: See TracTickets for help on using tickets.