home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 6
/
Sonderheft_6-96.iso
/
pd
/
disktools
/
kan
/
kan.doc
< prev
next >
Wrap
Text File
|
1996-11-03
|
12KB
|
376 lines
Page 1 The Kan System Page 1
The Kan System
Version 1.0a
Copyright © 1992 by James Kevin Butts
All rights reserved
Page 2 The Kan System Page 2
1. Introduction
Have you ever deleted a file (or half a hard disk) and then
realized that you were in the wrong directory? Well, of course
you have! Enter, the Kan System. This handy, dandy utility
allows your current DELETE command under CLI (and any other
program that deletes files) to move the file to a directory for
later removal. Rather than instantly deleting a file, Kan will
simulate Workbench's Trashcan. Files and whole directories are
moved to a special directory which is automatically cleared once
a day when you boot.
2. Contents
This document should be accompanied by the following files :
INSTALLKAN - program to install the KAN system on your machine.
PINSTALL - program that patches new delete logic into your system.
PDOS - program that changes KAN option settings.
PURGE - a script to delete the files in each KAN directory.
PURGEALL - a script to delete files in all KAN directories.
SHIFTKAN - a script that shifts the KAN directories around.
DEL2 - a script to allow REAL deletion of files.
SAMEDAY - a program to determine if this is the first boot today.
KAN.DOC - me.
3. How to
To install KAN do the following :
* Make sure your current directory contains the files listed above.
* Type "InstallKAN"
Don't worry about InstallKAN. It will copiously describe every
action it performs and will give you the option of aborting the
script before any action that modifies your system. If InstallKAN
aborts because of an error you will be informed of the error and
what has been modified on your system. After removing the cause of
the error, you can run InstallKAN again. Also, you may run
InstallKAN at any time to reconfigure the KAN system.
In a nutshell, InstallKAN asks you what partitions you want to
automatically PURGE daily. Then it creates KAN directories on each
of those partitions. Then INSTALLKAN, PINSTALL, PDOS and SAMEDAY
are placed in the directory you specify as your permanent C
directory. Then PURGE, PURGEALL, SHIFTKAN, and DEL2 are placed in
the directory you specify as your permanent S directory. Also the
KAN-SEQUENCE script is built and placed in that same directory.
Finally KAN informs you to add the following line to your
Startup-Sequence :
EXECUTE "<sdir>Kan-Sequence"
How to
Page 3 The Kan System Page 3
4. What
where <sdir> is your permanent S directory. In most cases this will
be the S: directory. Now you are installed.
Now, here's what you've done to your system once you have
installed Kan :
Every time you delete a file or directory it is really moved to the
"KAN" directory in the root of whatever partition said file resides
upon. This is equivalent to dragging an icon over the Trashcan. It
is still recoverable because it is only in the trash and has not been
carried to your local landfill yet.
If you now realize... OOPS! I WAS IN THE WRONG DIRECTORY!!! Your
file is safe and sound in KAN(sas). (Sorry, I just couldn't help
myself;pun definitely intended but regretted.) Ok, say you reboot...
It's still in your KAN directory (assuming this is still today). Now,
say you turn off your machine and come back the next day (or next
week,etc.). The Startup-Sequence will clear out the KAN directories
specified in Kan-Sequence which is created by InstallKAN when you tell
it which partitions to include. Those not specified in PURGE will not
purge daily. You will have to call "PURGE VOL:" where VOL is the name
of the partition, when you want to purge each of those volumes.
However, things are just a little more complex than that because I
let you have more than one Kan! If you specify one Kan then each
partition will contain one directory called KAN. This directory will
be purged each new day you turn on your machine. If you specify
seven Kans then each partition will contain KAN, KAN2, KAN3, ..., and
KAN7. Each new day that you boot the directories will shift. This
means a deleted file will move into KAN then to KAN2 then to KAN3 and
on eventually to KAN7 and finally back to KAN just before it is
purged. This gives you seven days of computing before the file is
really deleted!
If you are tight on space then you might want to go with only 1
KAN directory per partition. If you decide to go housecleaning on
your harddisk then use the DEL2 script instaed to REALLY delete the
file(s).
Finally PINSTALL, the command that installs the new KAN logic into
your system in place of the old DELETE logic, has some interesting
options. These options are modifed by calls to PDOS. Typing
PINSTALL will install the new logic. This is performed in
KAN-SEQUENCE during boot up. Typing PDOS OFF will restore the old
DELETE logic. Generally you will never have to do this. Please try
to remember to not un-install PDOS while another program is deleting
a file! Typing PDOS ADD causes the shell you are typing in to always
perform REAL deletes. PDOS ADDQ works just like PDOS ADD except no
message is printed if the shell is already marked to perform REAL
deletes. This option is used by the DEL2 script. PDOS REM will
mark a shell so that it will perform KAN deletes (this is the default
when a shell is created). The script DEL2 uses the ADDQ and REM
features to perform a REAL delete and then restores the script to its
What
Page 4 The Kan System Page 4
4. What
previous settings. But your system's performance isn't degraded
through calls to DEL2. This is because PDOS is pure and
KAN-SEQUENCE adds PDOS to the resident list. Thus bracketing Delete
with PDOS ADD and PDOS REM hardly makes a difference in speed.
Unfortunately, with PDOS installed, ALL deleted files end up in
the Kan - some you might not have known about. For instance, some
text editors save a file by first saving to a temporary file, then
the original file is deleted, and finally the temporary file is
renamed. Therefore, the Kan will hold all old versions of your
files. This is great if you have the disk space!.
To reduce the number of temporary files that will build up on
your system, I added an exceptions table that will hold 20
exceptions for filenames. The entries in the table can be up to 20
characters in length and they represent the FIRST characters of
the filename (no wildcards necessary). For instance,
PDOS ADD !LZ-RECOVERY!.
will tell pdos to refrain from saving the temporary file (such as
!LZ-RECOVERY!.012392) from the LZ command. The entries are
case sensitive. However, because this feature is provided to
avoid temporary files created automatically, this should be no
problem. Simply keep an eye on your KAN directories for the next
few weeks and add PDOS ADD filename commands to your
Startup-Sequence when you see temporary files appear.
Note the rules under which REAL deletes will occur :
* From any shell in which PDOS ADD has been typed.
NOTE : Any program run from this shell even if it has
its own window or screen may or may not perform
REAL deletes.
* Any file whose partial name is in the exceptions table.
* On any partition which does not have a ":KAN" directory.
* Any file already in a ":KAN" directory.
* Actual empty directories are deleted.
5. Examples
Assume a file exists on RAM called ooga and RAM:KAN exists.
Typing "DELETE RAM:ooga" will move RAM:ooga to RAM:KAN/ooga.
Typing "DELETE RAM:KAN/ooga" will REALLY delete ooga.
Also, typing "DEL2 RAM:KAN/ooga" will delete it.
NOTE: Similar results will be seen from disk utilities and
even the Workbench menu. The Kan is not limited to
the CLI but is a system-wide program!
Examples
Page 5 The Kan System Page 5
5. Examples
Assume a file exists on RAM called ooga and RAM:KAN exists
already containing a file called ooga. Typing "DELETE RAM:ooga"
will move RAM:ooga to RAM:KAN/ooga;1. Therefore, you do not have
to worry about deleting several files with the same name
overwriting each other. You may have up to 100 files in KAN
coming from the same name (ooga through ooga;99). If you try to
delete a 101th file you will be warned and the deletion will not
occur. You can then PURGE and try again.
NOTE : Deleting the 100th ooga will take longer than the first
since Kan must search for a free slot in the KAN directory.
Assume you have have a directory such as FONTS with
subdirectories and a KAN directory. Typing "DELETE FONTS ALL"
will move every file in every subdirectory into KAN. Thus,
directory structure is not preserved. However, this is better
than nothin'.
6. License
Kan System version 1.0a
© Copyright 1992 James Kevin Butts
DISCLAIMER
----------------------------------------------------------------------------
The author takes no responsibility as to the suitability or accuracy of this
documentation and/or the program(s) it describes. Any damage sustained by
the use of this documentation and/or the program(s) it describes is the
sole responsibility of the user her/him self.
----------------------------------------------------------------------------
COPYRIGHT
----------------------------------------------------------------------------
Kan System, © Copyright 1992 by James Kevin Butts. All rights reserved.
This program may be distributed non-commercially only providing that the
documentation, copyright notice, and any other included files remain intact.
This program is FREEWARE so no financial donation is necessary (but welcome).
----------------------------------------------------------------------------
TroubleShooting
Page 6 The Kan System Page 6
7. Feedback
If you have any comments, ideas what could or should be
improved, bug reports or just like to chat a bit, please feel
free to contact me at the following address.
James Kevin Butts
2065 Sunlake BLVD #1408
Huntsville, AL 35824
8. Thanx
I would like to thank the following personages for answering
my echos, sending me sample code, beta tested code, ad
infinitum. (I always wanted to add infinity.) :)
Richard Rauch
Paul Kienitz
Pierre Dak Baillargeon
Tony Bybell
Jason Burley
Steven (Dragon) Johnston
and anyone else who made any contributions.
9. Index
1. Introduction .................................... 2
2. Contents .......................................... 2
3. How to ........................................... 2
4. What ............................................ 3
5. Examples ......................................... 4
6. License ......................................... 5
7. Feedback ........................................ 6
8. Thanx ........................................... 6
9. Index ............................................ 6
Index