home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.24 / text0087.txt < prev    next >
Encoding:
Text File  |  1991-09-03  |  2.5 KB  |  60 lines

  1. Submitted-by: karish@pangea.stanford.edu (Chuck Karish)
  2.  
  3. >The current draft of the POSIX user portability extensions spec says
  4. >that df and du should give sizes in units of 512 bytes.  I have found
  5. >this behavior confusing and inconvenient; I suspect others do too.
  6.  
  7. I have found this behavior confusing only because it's not
  8. consistent.  On many systems, df and du use different units,
  9. the utilities' output doesn't specify which units are used,
  10. and in some cases the man pages refer only to 'blocks', leaving
  11. the user to decide whether the block size is 512 bytes, 1024
  12. bytes, or the file system's block size.
  13.  
  14. >Some other people involved in the standards process have said they
  15. >prefer units of 1024; in response, the committee added the -k option,
  16. >which says to use 1024 instead of 512.
  17.  
  18. On some systems I've used the '-k' option also changes the format
  19. of df output.  It should always cause the utilities to display
  20. the units used.
  21.  
  22. >I think this is not a real solution.  The use of 512 as the unit will
  23. >make life difficult for beginning users who don't know about -k.  And
  24. >it seems silly to make 512 the default if users won't like it.
  25.  
  26. Users are surprising adaptable when they're provided a consistent
  27. interface.  Note also that the default block sizes for other
  28. UNIX utilities should be considered.  dd, cpio, and tar default
  29. to 512-byte blocks (except when the medium is tape, for tar).
  30. It's important to keep in mind what a block is both on the command
  31. line and in scripts.  I find it easier to do so when the utilities
  32. all read and write data and report block counts in the same units.
  33.  
  34. >The committee chose 512, not because they think users prefer it,
  35. >but for totally unrelated reasons having to do with how BSD and 
  36. >System V behave.
  37.  
  38. 512 bytes has been a standard block size for tape and disks for
  39. far longer than BSD and System V have existed.
  40.  
  41. >I think this decision should be made based on the
  42. >preferences of actual users.  If the users tell the committee what
  43. >they want, the committee may yet listen.
  44. >
  45. >Aside from that, we can make the GNU system do what users prefer even
  46. >if that disagrees with POSIX.  We don't have to follow the standard.
  47.  
  48. Your system doesn't ever have to be any more than a hobbyist's
  49. toy, either.  The more it diverges from industry standards the
  50. more differences users will have to allow for when moving from
  51. gnu to a commercial system.  Ask me about alloca() another time ...
  52. --
  53.  
  54.     Chuck Karish        karish@mindcraft.com
  55.     (415) 323-9000        karish@forel.stanford.edu
  56.  
  57.  
  58. Volume-Number: Volume 24, Number 88
  59.  
  60.