home *** CD-ROM | disk | FTP | other *** search
-
-
- Page 1 RM's Documentation Page 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- RM
- (c) Copyright 1989 by Martin J. Laubach
- All rights reserved
-
-
-
-
-
-
-
-
- 1. Introduction
-
- It happened again. Just now. You wanted to delete a couple of
- files, and one tiny extra space crept in. The result -- "delete
- t: #?", was devastating. A week's work is gone.
-
- That's where rm comes in. Instead of immediately deleting the
- files, they will be moved to some trash directory. When you are
- sure everything is OK (after some minutes when everything has
- settled), you can empty it (at my place this automatically
- happens once a day -- files older than 24 hours are then
- erased).
-
-
- 2. How to
-
- You will have to create a directory called "Junk" (or
- something else, see below for more on that subject) that will
- temporarily hold the rm'ed files, in the root of each volume you
- intend to use rm on -- ie. for each partition on your hard
- drive, if your partitions are called DH0: and DH1:, you need
- "DH0:Junk", "DH1:Junk".
-
- Now, when you are rm'ing a file, it is not immediately
- physically erased, but rather moved to that "Junk" directory.
- Now, should you discover you just (accidentially, of course)
- rm'ed some important file, all you have to do to recover it is
- to go to the Junk directory, and move or copy the file back.
-
-
- How to
-
-
- Page 2 RM's Documentation Page 2
-
-
-
- Rm, of course, supports wildcards. "Rm #?" will delete
- everything in your local directory (including directories and
- "busy" files). "Rm #?.o" will remove all object modules --
- please see your AmigaDOS manual for more information on
- wildcards.
-
- You may also give it more than one parameter: "rm foo bar baz"
- will attempt to remove the files or directories called foo, bar
- and baz (in that order). If one of the removals fails, the whole
- operation is aborted with an appropriate error message.
-
-
- Once you really are sure you haven't removed anything lethal
- (typically the next day), you can really (physically) delete the
- files. The enclosed "purge" script, which needs the arp shell
- and ARexx to run (one could do without ARexx -- it's just bells
- and whistles), goes through each existing junk directory and
- does such a delete.
-
-
- 3. Goodies
-
- And finally -- two more bonus points: First, rm is very short
- (752 bytes in the current version). That's for the people with
- the very-full-c-directory-mania. And second, rm is completely
- reentrant and can be made resident (e.g. with ARes). That's for
- the people with the strange I-still-have-two-megs-left feeling.
-
-
- 3.1. Bells
-
- Since I hate iron cast (read hard coded) definitions, you are
- of course not limited calling the directory "Junk" -- it's just
- the default name. Should you want to use your WorkBench
- "TrashCan" directory, "T", or anything else, here is how to do
- so. Using environment variables, you can assign the trash
- directory to whatever name you want. All you have to do is a
- "Set JUNK MyDir" (e.g. in the startup-sequence), and the rm'ed
- files will go into ":MyDir" instead.
-
-
- 3.2. Whistles
-
- Another nice feature of rm is that it allows multiple versions
- of files. Suppose you just rm'ed "Foo:Foo", and you now remove
- "Bar:Foo" -- rm won't overwrite the first version with the
- second (and thus effectively deleting the first), but keep it
- and add a version number to each same file that is deleted. The
- first time you remove "Foo", it will be moved to ":Junk/Foo".
- Each following removal of a file called "Foo" results in
- ":Junk/Foo;1", ":Junk/Foo;2" and so on.
-
-
-
-
- Goodies Whistles
-
-
- Page 3 RM's Documentation Page 3
-
-
- 4. Caveats
-
- Rm needs the "arp.library", version 39 or higher to run.
-
- Since the files aren't physically removed, you will need some
- free space on each volume -- just rm'ing files won't give you
- more space on a 99% full drive. You will have to purge the trash
- directories.
-
- The junk directory must reside on the current volume -- since
- it is not possible to rename files across volumes, that means
- that every partition of your harddisk must have such a junk
- directory.
-
- Also, I can't really imagine using this tool on a floppy-only
- system.
-
- You shouldn't let the Junk directory grow too large --
- especially when there are many versions of a file, rm will take
- longer and longer. It's probably not a good idea to keep "Bar"
- to "Bar;999", as now "rm Bar" will take rather long to execute.
-
-
- 5. What
-
- In this archive, you should find the following files:
-
- rm.doc .... What you are reading right now.
- rm.asm .... The source for rm.
- makefile .. Guess what.
- rm ........ The executable
- purge ..... A script to purge the junk directory
-
-
- 6. Where
-
- 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 one of the following addresses... I just
- *love* receiving mail!
-
- Usenet: mjl@alison.at
- ..!uunet!mcsun!tuvie!alison!mjl
-
- or
-
- FidoNet: "Martin Laubach" at 2:310/3.14
-
-
- Looking forward to reading from you,
-
- mjl
-
-
-
-
- Where
-
-
- Page 4 RM's Documentation Page 4
-
-
-
- 7. License
-
- This material is (c) Copyright 1989 by Martin J. Laubach -- All
- rights reserved.
-
- It may be distributed freely as long as the following
- restrictions are met:
-
- The distributor may charge a fee to recover distribution
- costs. The fee for diskette distribution should not be more than
- the cost to obtain the same diskette from Fred Fish.
-
- The distributor agrees to cease distributing the programs and
- data involved if requested to do so by the author.
-
- You may copy and distribute verbatim copies of the program's
- executable code and documentation as you receive it, in any
- medium, provided that you conspicuously and appropriately
- publish only the original, unmodified program, with all
- copyright notices and disclaimers of warranty intact and
- including all the accompanying documentation, example files and
- anything else that came with the original.
-
- The author will not be liable for any damage arising from the
- failure of this program to perform as described, or any
- destruction of other programs or data residing on a system
- attempting to run the program. While I know of no damaging
- errors, the user of this program uses it at his or her own
- risk.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- License
-
-
- Page 5 RM's Documentation Page 5
-
-
- 8. Road Map
-
-
-
- 1. Introduction .................................... 1
- 2. How to ........................................... 1
- 3. Goodies ......................................... 2
- 3.1. Bells ........................................ 2
- 3.2. Whistles ..................................... 2
- 4. Caveats ......................................... 2
- 5. What ............................................ 3
- 6. Where ........................................... 3
- 7. License ......................................... 4
- 8. Road Map ......................................... 5
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Road Map
-
-