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 >
Wrap
Text File
|
1992-08-03
|
6KB
|
160 lines
»»»»»«««««
Du 2.5
»»»»»«««««
© 1992 - Stuart Mitchell
email: stuart@minster.york.ac.uk
1. Copyright/Distribution
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
Du is copyright Stuart Mitchell, 1992 but is otherwise freely
distributed provided the source (du.a,makefile) and documentation
(du.doc) files accompany the executable and are not altered in any way.
No donations to the author are required, however a postcard or email
message saying where you got the program from and any comments you have
would be appreciated.... See below for the address.
2. Introduction
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
What is Du? AmigaDos provides no simple way of calculating the size of
a directory including all its sub-directories. Du is a very small
program (its only 932 bytes long!) designed to overcome this
limitation. Inorder to keep program size down, Du has been designed to
be executed from the shell, however it can be executed from WB by using
the "Show All Files" option of the workbench's "Window" menu and then
double clicking on the icon workbench displays.
Du requires Kickstart 2.0, if the program does not find this it will
not crash, however no error message will be printed. This was done to
minimise the size of the final executable program.
Du was written on an Amiga 2000 fitted with a GVP 33Mhz 68030 board.
It has also been tested on a 68000. Du was assembled with the "A68k"
assembler written by Charlie Gibbs.
3. Shell Usage
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
Du can take any number of directories on the command line, plus a
number of switches which are used to modify it's behaviour. The
AmigaDos command template for Du is as follows:-
DIRS/M,FILES/S,DIRS/S,NOHEAD/S,NOTOTAL
DIRS The directories or files to be scanned. Any
number of directories can be specified.
If the DIRS/M argument is omitted then the
current directory is assumed.
FILES Switch which when set causes Du to only
consider files. (Du will not recurse into
sub-directories, nor will any directories
found be included in the totals).
DIRS Switch which when set causes Du to only
consider directories.
NOHEAD Switch to suppress the printing of the
table header.
NOTOTAL Switch to suppress the printing of the
total size of all files/directories
scanned. Note that no totals are printed
if the information for only one directory/file
is printed.
Du scans the specified files/directories (and their sub-directories) by
the DIRS/M argument and prints the number of bytes and blocks used by
the files. Each directory/file name can also contain the usual
AmigaDos wildcards:-
#? Match any pattern of characters
? Match a single character
(pat1|pat|...) Match "pat1" or "pat2" or ...
~(pat) All files which do not match "pat"
[pq]at Match "pat" or "qat"
4. Workbench Usage
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
Du has been designed to be executed from the Shell, however it can be
executed from workbench by using the "Show All Files" option of the
workbench "Window" menu. Workbench will then ask for the command line
arguments to be entered in the format described in the above section.
WARNING: Do not attach an icon to "Du" and then run it from workbench,
it *will* crash. However it is perfectly safe to use an icon which
is created by the "show all files" option.
5. Examples
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
1> du devs:
Files Dirs Bytes Blocks
11 3 130022 273 devs:
1> du devs: libs:
Files Dirs Bytes Blocks
11 3 130022 273 devs:
17 1 360996 735 libs:
----- ----- -------- ------
28 4 491018 1008
1> du ram:#? dirs
Files Dirs Bytes Blocks
15 2 1134 30 ram:env
0 1 0 0 ram:Clipboards
0 1 0 0 ram:T
----- ----- -------- ------
15 4 1134 30
1> du ram:env nototal nohead
15 2 1134 30 ram:env
6. About the Author
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
Stuart Mitchell, If you like this program then
34 Charthouse Rd., I'd appreciate a postcard or
Ash Vale, an email message from you.
Aldershot,
Hants., If you've found a bug or you
GU12 5LS. have some suggestions to make
then please tell me!
email: stuart@minster.york.ac.uk
7. Disclaimer
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
Du is distributed with no warranty whatsoever - whilst I have made
every effort to ensure that it is bug free there are no guarrantees...
However I have tested the program quite extensively (using various
tools such as Enforcer and Mungwall), and use the program myself, so it
should be okay :)