qumak on Tue, 5 Jun 2001 20:40:07 -0400


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: file system shenanigans (was: Re: [PLUG] ELF Init section)


Le Mardi  5 Juin 2001 20:39, vous (qumak) avez écrit :
> Le Mardi  5 Juin 2001 08:00, vous (gabriel rosenkoetter) avez écrit :
> > V-derived systems, this defaults to 512b blocks. On all the Linux
> > systems I've used, it seems to default to 1K blocks. On every system
> > trying to be POSIX compliant, du -k reports in 1K blocks.
> >
> > Does this imply that the ext2 file systems on all the Linux systems
> > I've used are using 1K blocks on disk? I doubt it. It's just what
> > whoever wrote GNU's du decided was appropriate (because it's easier
> > for a human to understand? I guess, but only because we've become
> > power-of-(about)-ten-byte centric in the 90s).
> >
> > I'm still distantly curious about why the default block sizes for
> > ext2 are what they are (does this make ext2 deal with a wider
> > variety of disks better with less user intervention? seems like a
> > program-that's-trying-to-be-too-smart problem would come up awfully
> > quickly that way), but I guess I'm more curious about what workloads
> > call for what block sizes (and fragment sizes, and cylinders per
> > group, and so forth). Any conventional or experimental wisdom on
> > that?
>
> well - this is what i see with du, would suggest against the 1K rule:
> [qumak@XXXX qumak]$ echo 'test' > sample
> [qumak@XXXX qumak]$ du -b sample
> 4096    sample
> [qumak@XXXX qumak]$ wc -c sample
>       5 sample
> [qumak@XXXX qumak]$
>
>
> this to me would suggest that du can be only as specific as the block size
> of your filesystem (the -b option looks for bits, by the way - much like wc
> -c, except of course the 4091 extra non-existant bits ;))
>
> I'm assuming the fifth byte is in fact the first, being a magic number, but
> i'm probably wrong, it could be something else entirely ;)
ok yeah i was wrong - it's the last byte (i looked in hexedit) - hex code 0A

anyone know exactly what that is?  would i be safe to assume that it means 
EOF?

--qumak(james)


______________________________________________________________________
Philadelphia Linux Users Group       -      http://www.phillylinux.org
Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce
General Discussion  -  http://lists.phillylinux.org/mail/listinfo/plug