"du" in C
Kai Windmöller
kai.windmoeller at gmx.de
Thu Jul 11 19:40:02 CEST 2002
Andre Landwehr wrote:
>
> Mein Ansatz war es, die Datei zu lstat'en und dann st_blocks *
> st_blksize zu nehmen. Die st_blksize ist immer 4096 bytes, was
> sich richtig anhört, aber st_blocks tut komische Dinge.
> Mittlerweile hab ich rausgefunden, daß st_blocks eine um
> Faktor 8 zu hohe Zahl liefert, jedenfalls auf dem einen
> Filesystem, auf dem anderen liegt der Faktor anders. Wovon hängt
> das ab / wie krieg ich den Faktor raus?
Ich rate mal:
st_blocks liefert Festplattenblöcke -> Festplattenblock = 512 Byte
512 Byte x 8 = 4096 Byte
ist diese rechung auch noch richtig für deine 'anderen' Faktoren?
Gruß Kai
More information about the Linux
mailing list