bug#10561: stat unclear about size on disk and type of blocks discussed

2012-02-07 Thread Pádraig Brady
On 02/07/2012 06:26 PM, Filipus Klutiero wrote: Hi Pádraig, On 2012-01-20 19:03, Pádraig Brady wrote: On 01/20/2012 05:47 PM, Filipus Klutiero wrote: Hi Pádraig and Jim, On 2012-01-20 09:15, Pádraig Brady wrote: On 01/20/2012 02:03 PM, Jim Meyering wrote: Pádraig Brady wrote: ... As

bug#10561: stat unclear about size on disk and type of blocks discussed

2012-02-07 Thread Filipus Klutiero
On 2012-02-07 13:55, Pádraig Brady wrote: On 02/07/2012 06:26 PM, Filipus Klutiero wrote: Hi Pádraig, On 2012-01-20 19:03, Pádraig Brady wrote: On 01/20/2012 05:47 PM, Filipus Klutiero wrote: Hi Pádraig and Jim, On 2012-01-20 09:15, Pádraig Brady wrote: On 01/20/2012 02:03 PM, Jim Meyering

bug#10561: stat unclear about size on disk and type of blocks discussed

2012-02-07 Thread Eric Blake
On 02/07/2012 12:20 PM, Filipus Klutiero wrote: So are you saying that stat cannot display a file's size on disk? Not without inventing a new % modifier, or else you doing the math yourself. So maybe it is worth adding a new one, as in: %S Allocated size (same as %b * %B) I don't see any

bug#10561: stat unclear about size on disk and type of blocks discussed

2012-02-07 Thread Filipus Klutiero
Hi Eric, On 2012-02-07 14:44, Eric Blake wrote: On 02/07/2012 12:20 PM, Filipus Klutiero wrote: So are you saying that stat cannot display a file's size on disk? Not without inventing a new % modifier, or else you doing the math yourself. Thank you very much. I apologize for much of what I

bug#10561: stat unclear about size on disk and type of blocks discussed

2012-01-20 Thread Pádraig Brady
On 01/20/2012 07:16 AM, Filipus Klutiero wrote: Today I tried figuring out how much disk space a small file took. I used stat, but that turned out surprisingly difficult: First of all, `du` is probably a better tool to this use case. Anyway... # LANG=C stat htpasswd.setup File:

bug#10561: stat unclear about size on disk and type of blocks discussed

2012-01-20 Thread Jim Meyering
Pádraig Brady wrote: ... As for %o, if you'd ask me what I/O block size means without any context, I'm far from being sure I would answer it means size on disk. I suggest to call this Size on disk, or Size used on the filesystem. I/O implies transfer. So it corresponds to an optimal

bug#10561: stat unclear about size on disk and type of blocks discussed

2012-01-20 Thread Pádraig Brady
On 01/20/2012 02:03 PM, Jim Meyering wrote: Pádraig Brady wrote: ... As for %o, if you'd ask me what I/O block size means without any context, I'm far from being sure I would answer it means size on disk. I suggest to call this Size on disk, or Size used on the filesystem. I/O implies

bug#10561: stat unclear about size on disk and type of blocks discussed

2012-01-20 Thread Filipus Klutiero
Hi Pádraig and Jim, On 2012-01-20 09:15, Pádraig Brady wrote: On 01/20/2012 02:03 PM, Jim Meyering wrote: Pádraig Brady wrote: ... As for %o, if you'd ask me what I/O block size means without any context, I'm far from being sure I would answer it means size on disk. I suggest to call this

bug#10561: stat unclear about size on disk and type of blocks discussed

2012-01-20 Thread Pádraig Brady
On 01/20/2012 05:47 PM, Filipus Klutiero wrote: Hi Pádraig and Jim, On 2012-01-20 09:15, Pádraig Brady wrote: On 01/20/2012 02:03 PM, Jim Meyering wrote: Pádraig Brady wrote: ... As for %o, if you'd ask me what I/O block size means without any context, I'm far from being sure I would

bug#10561: stat unclear about size on disk and type of blocks discussed

2012-01-20 Thread Paul Eggert
On 01/20/2012 06:15 AM, Pádraig Brady wrote: I'll go with optimal I/O transfer size hint, There's no guarantee that it's optimal, and I/O is always transfer, so how about something like I/O buffer size hint instead?

bug#10561: stat unclear about size on disk and type of blocks discussed

2012-01-20 Thread Pádraig Brady
On 01/21/2012 12:26 AM, Paul Eggert wrote: On 01/20/2012 06:15 AM, Pádraig Brady wrote: I'll go with optimal I/O transfer size hint, There's no guarantee that it's optimal, and I/O is always transfer, so how about something like I/O buffer size hint instead? Well I used optimal so

bug#10561: stat unclear about size on disk and type of blocks discussed

2012-01-19 Thread Filipus Klutiero
Today I tried figuring out how much disk space a small file took. I used stat, but that turned out surprisingly difficult: # LANG=C stat htpasswd.setup File: `htpasswd.setup' Size: 54 Blocks: 8 IO Block: 4096 regular file Device: 805h/2053d Inode: 5268976