home *** CD-ROM | disk | FTP | other *** search
- Submitted-by: karish@pangea.stanford.edu (Chuck Karish)
-
- >The current draft of the POSIX user portability extensions spec says
- >that df and du should give sizes in units of 512 bytes. I have found
- >this behavior confusing and inconvenient; I suspect others do too.
-
- I have found this behavior confusing only because it's not
- consistent. On many systems, df and du use different units,
- the utilities' output doesn't specify which units are used,
- and in some cases the man pages refer only to 'blocks', leaving
- the user to decide whether the block size is 512 bytes, 1024
- bytes, or the file system's block size.
-
- >Some other people involved in the standards process have said they
- >prefer units of 1024; in response, the committee added the -k option,
- >which says to use 1024 instead of 512.
-
- On some systems I've used the '-k' option also changes the format
- of df output. It should always cause the utilities to display
- the units used.
-
- >I think this is not a real solution. The use of 512 as the unit will
- >make life difficult for beginning users who don't know about -k. And
- >it seems silly to make 512 the default if users won't like it.
-
- Users are surprising adaptable when they're provided a consistent
- interface. Note also that the default block sizes for other
- UNIX utilities should be considered. dd, cpio, and tar default
- to 512-byte blocks (except when the medium is tape, for tar).
- It's important to keep in mind what a block is both on the command
- line and in scripts. I find it easier to do so when the utilities
- all read and write data and report block counts in the same units.
-
- >The committee chose 512, not because they think users prefer it,
- >but for totally unrelated reasons having to do with how BSD and
- >System V behave.
-
- 512 bytes has been a standard block size for tape and disks for
- far longer than BSD and System V have existed.
-
- >I think this decision should be made based on the
- >preferences of actual users. If the users tell the committee what
- >they want, the committee may yet listen.
- >
- >Aside from that, we can make the GNU system do what users prefer even
- >if that disagrees with POSIX. We don't have to follow the standard.
-
- Your system doesn't ever have to be any more than a hobbyist's
- toy, either. The more it diverges from industry standards the
- more differences users will have to allow for when moving from
- gnu to a commercial system. Ask me about alloca() another time ...
- --
-
- Chuck Karish karish@mindcraft.com
- (415) 323-9000 karish@forel.stanford.edu
-
-
- Volume-Number: Volume 24, Number 88
-
-