home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume39 / enh-du2 / part01 / README < prev   
Encoding:
Text File  |  1993-08-21  |  8.5 KB  |  214 lines

  1. @(#) README 1.15 93/08/18 00:08:57
  2.  
  3. "enh-du2" is a highly-portable, high-performance, POSIX-conformant
  4. reimplementation of the "du" command.  It also adds some helpful
  5. features your system "du" lacks.  If you find your current system "du"
  6. buggy or unacceptably slow, or if you find some of the features in
  7. this version appealing, you might want to try it.
  8.  
  9. This package includes, in addition to the enhanced "du" command, a
  10. couple of handy utilities.  The "dusort" filter formats the output of
  11. "du" nicely.  (Even if you aren't interested in the "du" program itself
  12. check out this filter.)  The "ngsizes" script produces a summary of
  13. disk space used by the usenet news system.  It puts some of the
  14. "enh-du2" features to good use.
  15.  
  16.  
  17. === Contents =================================================================
  18.  
  19.     - Overview
  20.     - Installation
  21.     - Credits
  22.  
  23.  
  24. === Overview =================================================================
  25.  
  26. Word to the impatient:  Edit "Makefile" and "config.h", then run "make".
  27.  
  28. This version supercedes the "enh-du" published in comp.sources.misc
  29. volume 14.  The update is not intended to provide an explosion of
  30. chrome and bloat (aka "gratuitous features").  This release mainly
  31. improves portability, especially in heterogeneous networked environments.
  32.  
  33. The original "enh-du" was written to address several problems.  There
  34. were some things I couldn't do with the vendor-provided "du".  Sometimes,
  35. for example, I wanted to see usage in 1K blocks instead of 512-byte
  36. blocks, or I wanted to look at disk usage without accumulating
  37. subdirectory usage into parent directories.  Moreover, I found that
  38. many vendors shipped versions of "du" that were broken (most common
  39. bug was incorrect indirect block overhead calculations) or sluggish.
  40.  
  41. I think the original release met those goals.  This version addresses
  42. a couple of additional issues.  It is more portable.  It is more
  43. reliable, particularly in networked environments where one or more
  44. vendors don't do stat(2) correctly.  It should not be compatible with
  45. Posix 1003.1.  Oh yeah, and it does add a few new features.
  46.  
  47. In the time since the original "enh-du" was released, many vendors
  48. have gotten their act together, providing versions of "du" that fixed
  49. the bugs and improved performance.  None the less, I've found that
  50. "enh-du2" performs favorably with respect to every alternative I have
  51. tried -- including both vendor supplied and freely available versions.
  52. This means that if you use "enh-du2" for the added features, you should
  53. not pay a performance penalty for that choice.
  54.  
  55. Two new features have been added to this release per the requests of
  56. several people.  An "-L" switch has been added to average the usage of
  57. multiply-linked files across all of the links.  A "-C" switch has
  58. been added to display a file count in addition to the disk usage.
  59.  
  60. To give you a feel for what this program can do, here is the output
  61. of "du -h".  Portions of this message are site dependant, and so your
  62. mileage may vary.
  63.  
  64. du - version 2.0
  65.     Copyright 1990-1993, Unicom Systems Development, Inc.  All rights reserved.
  66. Usage:
  67.     du [ options ] [ path ... ]
  68. Options:
  69.     -a          Report all entries, i.e. files as well as directories.
  70.     -b          Equivalent to "-B 1".
  71.     -B n        Report in blocks of "n" bytes (default 512).
  72.                   (Use "0" to report in native filesystem blocks.)
  73.     -c n,n,...  Breakdown by age, one col for each "n" days or older.
  74.     -C          Display file counts as well as disk usage.
  75.     -f          Do not cross any filesystem mount points.
  76.     -F          Do not cross remote filesystem mount points.
  77.     -h          Display this help message.
  78.     -i          Do not accumulate subdirectory usages into parent dir.
  79.     -k          Equivalent to "-B 1024".
  80.     -l          Count multiply linked files each time encountered.
  81.     -L          Average usage of multiply linked files across the links.
  82.     -s          Only report a total for each argument on command line.
  83.     -t          Report a grand total of all items.
  84.     -u          Skip (do not count) multiply linked files entirely.
  85.     -U user     Report only usage by given user (specify name or id num).
  86.  
  87.  
  88. === Installation =============================================================
  89.  
  90. enh-du2 is distributed ready to go for an SCO Unix 3.2v2 system.  If you
  91. are using something else, you've got a bit of work to do.  Here are the
  92. steps to bring up the package:
  93.  
  94.   - Customize the "config.h" file for your system.
  95.  
  96.   - Customize the definitions at the top of the "Makefile".
  97.  
  98.   - Run "make".
  99.  
  100.   - Try it.  If you like it run "make install".  You will, however,
  101.     need to customize a bunch of definitions in the "Makefile" to
  102.     tell the install to do what you want.
  103.  
  104. I have reports that "enh-du2" runs on the following systems:
  105.  
  106.     HP/9000 series 400    HP-UX 8.02
  107.     HP/9000 series 800    HP-UX 8.02
  108.     IBM RS/6000        AIX3.1
  109.     NCR Tower        SysVr3.1 (NCR release 03.00.00)
  110.     Sun SPARC        SunOS 4.1.2, Solaris 2.1
  111.     AT&T 3B1        SysVr3.2 (ver 3.51m)
  112.     AT&T 3B2        SysVr3.1
  113.     386            AT&T SysV 3.2.2.3
  114.     386            ISC SysVr3.2 versions 2.0.2, 2.2, 3.0.1
  115.     386            MicroPort SysV 3.0U3.0e
  116.     386            SCO Xenix 2.3.X
  117.     386            SCO Unix 3.2v2, 3.2v4
  118.     386            BSDI versions 0.9.2, 1.0
  119.  
  120. If you get stuck configuring "enh-du", some possibly helpful information
  121. follows.  I'll show you the settings I used when testing the package on
  122. various systems.
  123.  
  124. The following table shows the "config.h" settings.  The distributed
  125. file is setup for SCO Unix 3.2v2.  A "-" in the table means the item
  126. was not changed from the distributed setting.  "enab" means the
  127. definition was enabled and "disab" means it was commented out.
  128.  
  129.         distributed
  130.        configuration
  131.          |
  132.          |
  133.         \|/
  134.         SCO    SCP    SCO    ISC                AT&T 3B2
  135.         Unix    Unix    Xenix    Unix    Solaris    SunOS    BSDI    and NCR
  136.         3.2v2    3.2v4    2.3.4    2.2,3.0    2.1    4.1.2    1.0    Tower
  137.  
  138. USE_DIR_xxxx    DIRENT    -    -    -    -    -    -    -
  139. USE_MOUNT_xxxx    MNTTAB    -    -    -    R4MNTTAB MNTENT    FSTAB    -
  140. USE_STATFS_xxxx    SYSV    -    -    -    -    SUN    BSD    -
  141. USE_SYMLINKS    disab    enab    -    -    enab    enab    enab    -
  142. USE_STBLOCKS    disab    -    -    -    enab    enab    enab    -
  143. BROKE_STBLOCKS    disab    -    -    -    -    -    -    -
  144. USE_STDARG    enab    -    -    disab    -    disab    -    disab
  145. USE_UNISTD    enab    -    -    -    -    -    -    -
  146. USE_PATHCONF    enab    -    disab    disab    -    -    -    disab
  147. PTRTYPE        void    -    -    char    -    -    -    char
  148. REPORT_BLKSIZE    512    -    -    -    -    1024    -    -
  149.  
  150. Here are the CDEFS and LIBS settings I used in the "Makefile":
  151.  
  152. System                CDEFS =        LIBS =
  153.  
  154. SCO Unix 3.2v2, 3.2v4        (empty)        -lmalloc
  155. SCO Xenix 2.3.4            (empty)        -lmalloc -ldir
  156. ISC Unix 2.2, 3.0        (empty)        -lmalloc
  157. Solaris 2.1            (empty)        -lmalloc
  158. SunOS 4.1.2            (empty)        (empty)
  159. BSDI 1.0            (empty)        (empty)
  160. AT&T 3B2 and NCR Tower        -I.        -lmalloc
  161.  
  162.  
  163. === Credits ==================================================================
  164.  
  165.  
  166. My thanks and gratitude to several folks.  Lars Henrik Mathiesen
  167. <thorinn@diku.dk> provided a very nifty algorithm to figure out the
  168. quanta for st_blocks.  Chip Salzenberg <chip@tct.com> enhanced the
  169. portability greatly, and provided the AIX mount table handling code.
  170. Bill Bunton <wgb@tnt.com> and Bill Kennedy <bill@ssbn.com> gave me
  171. logins on a bunch of machines.
  172.  
  173. Additional thanks to the following folks for testing enh-du2 and
  174. providing suggestions and fixes:
  175.  
  176.     Dave Ratcliffe <compnect!dave@uwm.edu>
  177.     afc@shibaya.lonestar.ORG (Augustine Cano)
  178.     bill@unixland.natick.ma.us (Bill Heiser)
  179.     consult!bob@uunet.uu.net
  180.     ole!rwing!pat@cs.washington.edu (Pat Myrto)
  181.     pilikia.pegasus.com!art
  182.     wht@n4hgf.Mt-Park.GA.US (Warren Tucker)
  183.     wyman@atherton.com (Wyman Chong)
  184.     clive@x.co.uk (Clive Feather)
  185.     Kari Sutela <sutela@utu.fi>
  186.     graaff@dutiws.TWI.TUDelft.NL (Hans de Graaff)
  187.  
  188. There were many others -- these names were culled from my email archives.
  189. My apologies if I left your name of the list.
  190.  
  191. What I learned from this:  given a choice, I'd probably choose an HP
  192. or IBM computer over a case of the clap, but I'd have to think about
  193. it first.  (On the other hand, as one guy pointed out to me, they've
  194. got a cure for the clap.)
  195.  
  196. This program is copyright 1990-1993, Unicom Systems Development, Inc.
  197. All rights reserved.
  198.  
  199. You are granted a non-exclusive license to use, modify, copy, and
  200. distribute this software subject to the following conditions.  You
  201. must ensure all copyright notices and license notices remain intact
  202. in the copies you use or distribute.  Any modifications, other than
  203. those in the areas clearly reserved for site-specific modifications,
  204. must be marked as such.  This software is provided "as is".  No
  205. warranties have been expressed or implied.  Since this license was
  206. provided to you at no charge, you must assume the entire risk and
  207. liability for all use of this software.
  208.  
  209. Comments, suggestions, and bug reports are welcomed to the address below.
  210.  
  211. Chip Rosenthal
  212. <chip@chinacat.Unicom.COM>
  213.  
  214.