home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d8xx / d805 / sizer.lha / Sizer / Sizer.doc < prev    next >
Encoding:
Text File  |  1993-01-24  |  8.5 KB  |  223 lines

  1.  
  2.                            S I Z E R    D O C
  3.  
  4.  
  5.                              © Gérard CORNU
  6.  
  7.  
  8.                           version 0.81 8-Jan-93
  9.  
  10.                          Compiled with SAS/C® 6.1
  11.  
  12.    Sizer is ©1992 Gérard Cornu, but freely redistributable. When re-
  13.    distributing don't forget to include this unmodified doc file. And
  14.    don't charge more than the cost of an AmigaLibdisk from Fred FISH.
  15.  
  16.    This program cannot be used for commercial purposes, or included on
  17.    magazine's cover disks, apart from "AMIGA DP" (the french AmigaNews
  18.    sister's magazine exclusively dedicated to Amiga PD), without the 
  19.    written permission of the author.
  20.  
  21.    Peter Miles (see end of file) is certainly allowed to include it in 
  22.    the ICPUG Amiga library.
  23.  
  24.    Fred Fish is obviously allowed to include it in its unique AmigaLibDisk 
  25.    library.
  26.  
  27.    Thierry Colin (Amiga DP / DPAT) is authorised to include it in the french
  28.    speaking Amiga PD collection "DPAT" (Domaine Public Amiga Toulouse).
  29.  
  30.  
  31. What is sizer ?
  32. ~~~~~~~~~~~~~~~
  33.       Sizer is a quick and small CLI utility for getting the size of any 
  34.       devices, files, directories or 'assigns'. It accepts multiple 
  35.       arguments, with a limit of 30 (cf. SAS/C 6 docs).
  36.  
  37.       Sizer is best used with a directory utility.
  38.  
  39.       I have been developing and using it under KS 37.175 and WB 38.35 only.
  40.       I don't see any reason why it shouldn't work with newer release of
  41.       AmigaOs.
  42.  
  43.  
  44. How to use it?
  45. ~~~~~~~~~~~~~~
  46.       The format is as follows:.
  47.  
  48.          sizer [-v] {< device | directory | assign | file>}
  49.  
  50.       The -v option (verbose) is for displaying the filenames being sized.
  51.  
  52.       This gives much slower results, obviously.
  53.  
  54.       examples:
  55.  
  56.          sizer dh0:
  57.  
  58.          sizer -v MyDirectory
  59.  
  60.          sizer tools/mytooldir
  61.  
  62.          sizer ram:  sys:c  another_device:   etc...
  63.  
  64.       Don't use the '/' at the end of a directory name, but on the
  65.       other hand, you MUST use ':' at the end of a device or assigned
  66.       directory.
  67.  
  68.       To break Sizer, just press 'CTRL C'. If Sizer is sizing verbosly,
  69.       with the -v option, you have to hold the CTRL key and keep hitting
  70.       the C key repeatedly, until it finally decides to break, it will,
  71.       if you insist enough!
  72.  
  73.       As I said earlier, it is best used with a directory utility. Even
  74.       better with one which sends all the selected arguments at once.
  75.  
  76.       I shall give you the settings I have used to configure it with
  77.       DirWork 1.62 (shareware © 1990-92 Chris Hames):
  78.  
  79.       - Go in the configuration editor (1st top left menu).
  80.  
  81.       - Click on an unused button (in the top bank).
  82.  
  83.       - and fill the following boxes:
  84.  
  85.             Button text:   Size  (or whatever name you fancy!)
  86.  
  87.             Function:      u     (lower case)
  88.  
  89.             Selection:     B     (Upper case)
  90.  
  91.             SpecialOp:     ,     (comma)
  92.  
  93.             Option:        p     (lower case)
  94.  
  95.             Arguments:     (full path and name for sizer, plus -v if you
  96.                            like slowliness!.
  97.  
  98.                            Dont use 'Run >NIL:', RunBack or even 'Run'.
  99.  
  100.       - Click on 'Quit and use'
  101.  
  102.       - Once back to DirWork, save the new configuration.
  103.  
  104.       - That's it!
  105.  
  106.       - Now pick any dir or file in one of the file lists, then click
  107.         on the 'Size' button. A  window  should  open and 'sizer' will
  108.         display something like this, apart from the right hand side
  109.         column ;-)
  110.  
  111.  Block size:  512 bytes, for DH0:Locale
  112.  
  113.  Total number of files                  60                   1st line
  114.  Total number of directories            11                   2nd  "
  115.  Total number of bytes in files     180108                   3rd  "
  116.  Actual number of blocks used          463                   4th  "
  117.  
  118.           Actual size occupied :    237056 bytes, 231 K.
  119.  
  120.  
  121.       I wont explain the 1st line even if I have to say that it includes
  122.       all the files in all the subdirectories, for the second one, of
  123.       course it includes all the sub-directories and sub-sub-sub...
  124.       directories (if any!) plus the dir(s) given as argument(s).
  125.  
  126.       The 3rd line tells you the total number of bytes of all the files
  127.       and the 4th the actual number of blocks all the files, directories,
  128.       subdirectories, sub-sub...directories occupy on their respective
  129.       device. This total includes the user directory blocks, the file
  130.       header blocks as well as the file list blocks.
  131.  
  132.       Suppose you have 'sized' a directory containing 10 files with
  133.       a size of 256 bytes each. The 3rd line will tell you 2560 bytes,
  134.       but the 4th will say 21 blocks, 10 for the files themselves, plus
  135.       1 block for the 'File Header' for each file, plus 1 block for the dir
  136.       itself, which gives a total of 21 blocks. Suppose the  device on
  137.       which those files are kept have a real block size of 512  bytes,
  138.       the total occupied will be 10752 bytes.
  139.  
  140.       For each item it scans, 'sizer' looks at the block size of the
  141.       containing device and calculate the occupied size accordingly.
  142.  
  143.       The block size given in the heading of the results is the data block
  144.       size.
  145.  
  146.   **************************************************************************
  147.   *                                                                        *
  148.   *  Please note that while the data block size for OFS is 488 bytes, this *
  149.   *  is the 'usable' size, the 'raw' size is 512 bytes. A non HD floppy    *
  150.   *  has 1758 usable blocks so a raw size of 1758 x 512 = 900096 bytes or  *
  151.   *  879 KB, this doesn't mean that all that is available for your data.   *
  152.   *  Some of this is used by 'user direcory', 'file header'and 'file list' *
  153.   *  blocks. And if you are using OFS (OldFileSystem) for each block of    *
  154.   *  data, 24 bytes are used by the filing system.                         *
  155.   *                                                                        *
  156.   **************************************************************************
  157.  
  158.       BTW, using sizer, I discovered that the  block size for the Ram: disk
  159.       is actually 1024 bytes (with KickStart 37.175). Have a go at sizing
  160.       your env: dir...
  161.       Most other devices, hard disks, floppies have an actual block size 
  162.       of 512 bytes, but I have heard (read!) one might be able to change 
  163.       the block size with the new FastFileSystems.
  164.  
  165.  
  166. WARNING:
  167. ~~~~~~~~
  168.       This version of Sizer doesn't work with KS 1.3 or below.
  169.  
  170.       A quick word about Sizer and links. Personally I don't use links,
  171.       yet, I didn't get time to look at them! So Sizer has not been tested
  172.       with soft or hard links. But don't hesitate to give me any information
  173.       about them and Sizer's behaviour.
  174.  
  175.  
  176. Credits!
  177. ~~~~~~~~
  178.       This little utility was written with GREAT help from an article by
  179.       Paul OVERAA published by Amiga Format in the december 1990 issue,
  180.       page 209+.
  181.  
  182.       Sizer was written for myself, to help me file all the stuff (*freely
  183.       redistributable*) that I got from the great Peter MILES ¤
  184.  
  185.  
  186.   |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
  187.   |  Send any bug report, compliment ;-), dark chocolate (noir!), freely   |
  188.   |  distributable  software, 16 Gb hard disks, A3 48 bits colour scanners,|
  189.   |  brand new AMIGA 6000 with Alpha CPU, etc...                           |
  190.   |                                                                        |
  191.   |  OR SIMPLY A POST CARD to:                                             |
  192.   |                                                                        |
  193.   |                       Gérard CORNU                                     |
  194.   |                       11 avenue Edouard Aynard                         |
  195.   |                       69130 ECULLY                                     |
  196.   |                                                                        |
  197.   |                       FRANCE.                                          |
  198.   |                                                                        |
  199.   |                                                                        |
  200.   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  201.  
  202.  
  203.  
  204.                     Have plenty of nice days! ... me too!
  205.  
  206.  
  207.  
  208.     ¤ Peter Miles: ICPUG Amiga library organiser, (among other
  209.       ~~~~~~~~~~~~ responsibilities!).
  210.  
  211.       ICPUG is the one and only Independent Commodore Products Users Group.
  212.  
  213.       ICPUG is a non-profit making volontary group run by its members
  214.             for its members.
  215.  
  216.       To become a member of this brilliant club contact:
  217.  
  218.       Jack COHEN, ICPUG Membership secretary, P.O. Box 1309,
  219.       LONDON, N3 2UT, ENGLAND.
  220.  
  221.  
  222.  
  223.