home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CDPD Public Domain Collection for CDTV 3
/
CDPDIII.bin
/
fish
/
771-780
/
ff777
/
sizer
/
sizer.doc
< prev
next >
Wrap
Text File
|
1992-12-06
|
7KB
|
191 lines
S I Z E R D O C
Gérard CORNU
;-)
(0.36 ßeta, 14-Nov-92)
Sizer is ©1992 Gérard Cornu, but freely redistributable. When re-
distributing don't forget to include this unmodified doc file. And
don't charge more than the cost of an AmigaLib disk from Fred FISH.
This program cannot be used for commercial purposes, or included on
magazine's cover disks without the written permission of the author.
Peter Miles (see end of file*) is obviously granted permission to
include it in any ICPUG Amiga library disk ;-).
Fred Fish is obviously allowed to include it in its unique
AmigaLibDisk library.
Thierry Colin ("Amiga DP", french Amiga ONLY PD magazine) is also
authorised to include it in the french PD collection "DPAT" (Domaine
Public Amiga Toulouse).
What is sizer ?
~~~~~~~~~~~~~~~
Sizer is a quick and small CLI utility for getting the size of
any devices, directories or 'assigns'. It accepts any number
of arguments. (Well, it's supposed to!)
I have been using it in 2.04 only but it doesn't use (as yet...)
any 2.04 features, so this beta version should also work in 1.3.
How to use it?
~~~~~~~~~~~~~~
As I said earlier it's a CLI (Shell) thingy.
The format has changed:
~~~~~~~~~~~~~~~~~~~~~~~
sizer [-v] {< device | directory | assign >}
The -v option is for displaying the filenames being sized.
This gives much slower results, obviously.
examples:
sizer dh0:
sizer -v MyDirectory
sizer tools/mytooldir
sizer ram: sys:c another_device: etc...
Don't use the '/' at the end of a directory name, but on the
other hand, you MUST use ':' at the end of a device or assigned
directory.
To break Sizer, just press 'CTRL C'. If sizer is sizing verbosly,
with the -v option, you have to hold the CTRL key and keep hitting
the C key repeatedly, till it finally decides to break, it will,
if you insist enough!
It is best used with a directory utility. Even better with one
which accepts multiple arguments. 'Pity DirWork don't, at least
not in version 1.62, the one I currently use. SID 2.0 very probably
has already got such a thing, with the 'bytes' button.
I shall give you the settings I have used to configure it with
DirWork 1.62:
- Go in the configuration editor (1st top left menu).
- Click on an unused button (in the top bank).
- and fill the following boxes:
Button text: Size (or whatever name you fancy!)
Function: u (lower case)
Selection: B (Upper case)
SpecialOp: , (comma)
Option: p (lower case)
Arguments: (full path and name for sizer, plus -v if you
like slowliness!.
Dont use 'Run >NIL:' or even 'Run' on its own)
- Click on 'Quit and use'
- Once back to DirWork, save the new configuration.
- That's it!
- Now pick any dir in one of the file lists, then click
on the 'Size' button. A window should open and 'sizer' will
display something like this:
Total number of files 17
Total number of directories 1
Total number of bytes in files 101108
Total number of blocks used 207
Total occupied: 105984 bytes, 103K
I wont explain the 1st line, for the second one, it includes
all the sub-directories and sub-sub-sub... directories if any.
The 3rd line tells you the total number of bytes of all the files
and the 4th the total number of blocks all the files, directories,
subdirectories, sub-sub...directories occupy on their respective
device.
Suppose you have 'sized' a directory containing 10 files with
a size of 256 bytes each. The 3rd line will tell you 2560 bytes,
but the 4th will say 20 blocks, 10 for the files themselves, plus
1 block for the 'File Header' for each file, which gives a total
of 20 blocks. Suppose the device on which those files are kept
have a block size of 512 bytes, the total occupied will
be 10240 bytes.
For each item it scans, 'sizer' looks at the block size of the
containing device and calculate the occupied size accordingly.
BTW, using sizer, I discovered that the block size of the Ram:
device is actually 1024 bytes (with KickStart 37.175). Most other
devices, hard disks, floppies have a block size of 512 bytes, but
I heard (read!?) one might be able to change the block size with
the new FastFileSystem......?!?!
Credits!
~~~~~~~~
This little utility was written with GREAT help from an article by
Paul OVERAA published by Amiga Format in the december 1990 issue,
page 209+.
It was written for myself, to help me file all the stuff I got
from the great Peter MILES ¤
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
| Send any bug report, compliment ;-), chocolates, freely distributable |
| software, 1Gb hard disks, A3 48 bits colour scanners, brand new |
| AMIGA 4000, etc... |
| |
| OR SIMPLY A POST CARD to: |
| |
| Gérard CORNU |
| 11 avenue Edouard Aynard |
| 69130 ECULLY |
| |
| FRANCE. |
| |
| |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Have plenty of nice days!
¤ Peter Miles: ICPUG Amiga library organiser.
ICPUG is the one and only Independent Commodore Products Users Group.
To become a member of this brilliant club contact:
Jack COHEN, ICPUG Membership secretary, P.O. Box 1309,
LONDON, N3 2UT, ENGLAND, EUROPE.