home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 700-799 / ff701.lha / du / Du.doc < prev    next >
Text File  |  1992-08-03  |  6KB  |  160 lines

  1.  
  2.  
  3.  
  4.                              »»»»»«««««
  5.                                Du 2.5
  6.                              »»»»»«««««
  7.  
  8.                       © 1992 - Stuart Mitchell
  9.  
  10.                  email: stuart@minster.york.ac.uk
  11.  
  12.  
  13.  
  14.  
  15. 1. Copyright/Distribution
  16. »»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
  17.  
  18. Du is copyright Stuart Mitchell, 1992 but is otherwise freely
  19. distributed provided the source (du.a,makefile) and documentation
  20. (du.doc) files accompany the executable and are not altered in any way.
  21.  
  22. No donations to the author are required, however a postcard or email
  23. message saying where you got the program from and any comments you have
  24. would be appreciated....  See below for the address.
  25.  
  26.  
  27.  
  28. 2. Introduction
  29. »»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
  30.  
  31. What is Du?  AmigaDos provides no simple way of calculating the size of
  32. a directory including all its sub-directories.  Du is a very small
  33. program (its only 932 bytes long!) designed to overcome this
  34. limitation.  Inorder to keep program size down, Du has been designed to
  35. be executed from the shell, however it can be executed from WB by using
  36. the "Show All Files" option of the workbench's "Window" menu and then
  37. double clicking on the icon workbench displays.
  38.  
  39. Du requires Kickstart 2.0, if the program does not find this it will
  40. not crash, however no error message will be printed.  This was done to
  41. minimise the size of the final executable program.
  42.  
  43. Du was written on an Amiga 2000 fitted with a GVP 33Mhz 68030 board.
  44. It has also been tested on a 68000.  Du was assembled with the "A68k"
  45. assembler written by Charlie Gibbs.
  46.  
  47.  
  48.  
  49. 3. Shell Usage
  50. »»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
  51.  
  52. Du can take any number of directories on the command line, plus a
  53. number of switches which are used to modify it's behaviour.  The
  54. AmigaDos command template for Du is as follows:-
  55.  
  56.    DIRS/M,FILES/S,DIRS/S,NOHEAD/S,NOTOTAL
  57.  
  58.         DIRS            The directories or files to be scanned. Any
  59.                         number of directories can be specified.
  60.                         If the DIRS/M argument is omitted then the
  61.                         current directory is assumed.
  62.  
  63.         FILES           Switch which when set causes Du to only
  64.                         consider files. (Du will not recurse into
  65.                         sub-directories, nor will any directories
  66.                         found be included in the totals).
  67.  
  68.         DIRS            Switch which when set causes Du to only
  69.                         consider directories.
  70.  
  71.         NOHEAD          Switch to suppress the printing of the
  72.                         table header.
  73.  
  74.         NOTOTAL         Switch to suppress the printing of the
  75.                         total size of all files/directories
  76.                         scanned. Note that no totals are printed
  77.                         if the information for only one directory/file
  78.                         is printed.
  79.  
  80. Du scans the specified files/directories (and their sub-directories) by
  81. the DIRS/M argument and prints the number of bytes and blocks used by
  82. the files.  Each directory/file name can also contain the usual
  83. AmigaDos wildcards:-
  84.  
  85.         #?              Match any pattern of characters
  86.  
  87.         ?               Match a single character
  88.  
  89.         (pat1|pat|...)  Match "pat1" or "pat2" or ...
  90.  
  91.         ~(pat)          All files which do not match "pat"
  92.  
  93.         [pq]at          Match "pat" or "qat"
  94.  
  95.  
  96.  
  97. 4. Workbench Usage
  98. »»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
  99.  
  100. Du has been designed to be executed from the Shell, however it can be
  101. executed from workbench by using the "Show All Files" option of the
  102. workbench "Window" menu.  Workbench will then ask for the command line
  103. arguments to be entered in the format described in the above section.
  104.  
  105. WARNING: Do not attach an icon to "Du" and then run it from workbench,
  106. it *will* crash. However it is perfectly safe to use an icon which
  107. is created by the "show all files" option.
  108.  
  109.  
  110.  
  111. 5. Examples
  112. »»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
  113.  
  114. 1> du devs:
  115. Files  Dirs    Bytes Blocks
  116.    11     3   130022    273 devs:
  117.  
  118. 1> du devs: libs:
  119. Files  Dirs    Bytes Blocks
  120.    11     3   130022    273 devs:
  121.    17     1   360996    735 libs:
  122. ----- ----- -------- ------
  123.    28     4   491018   1008
  124.  
  125. 1> du ram:#? dirs
  126. Files  Dirs    Bytes Blocks
  127.    15     2     1134     30 ram:env
  128.     0     1        0      0 ram:Clipboards
  129.     0     1        0      0 ram:T
  130. ----- ----- -------- ------
  131.    15     4     1134     30
  132.  
  133. 1> du ram:env nototal nohead
  134.    15     2     1134     30 ram:env
  135.  
  136.  
  137.  
  138. 6. About the Author
  139. »»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
  140.  
  141. Stuart Mitchell,                        If you like this program then
  142. 34 Charthouse Rd.,                      I'd appreciate a postcard or
  143. Ash Vale,                               an email message from you.
  144. Aldershot,
  145. Hants.,                                 If you've found a bug or you
  146. GU12 5LS.                               have some suggestions to make
  147.                                         then please tell me!
  148. email: stuart@minster.york.ac.uk
  149.  
  150.  
  151.  
  152. 7. Disclaimer
  153. »»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
  154.  
  155. Du is distributed with no warranty whatsoever - whilst I have made
  156. every effort to ensure that it is bug free there are no guarrantees...
  157. However I have tested the program quite extensively (using various
  158. tools such as Enforcer and Mungwall), and use the program myself, so it
  159. should be okay :)
  160.