home *** CD-ROM | disk | FTP | other *** search
-
- RM.C Version 4.1
-
- Description:
- This program simulates the UNIX "rm" command. It allows one to remove
- files and/or directory structures with ease. It will also hunt for and
- allow you to remove files with special attributes (like hidden or system
- files). The command line goes like:
-
- RM [-iravf] file_or_directory_name(s)
-
- -i Inquire before delete mode.
- -r Recursively delete directory structures.
- -a Inquire before deleting files that have the archive bit set.
- -v Verbose mode, list files and directories as they are removed.
- -f Remove without prompting or complaining.
-
- The option flags apply only to those items that follow them on the
- command line. For instance:
-
- rm dumb.txt -r dumbdir -i a:gooddir
-
- will delete "dumb.txt", then recursively delete "dumbdir" and all it's
- contents, then ask before recursively deleting "a:gooddir". If you say
- "yes", it will then stop on each item in "a:gooddir" and ask before
- deleting it. If you leave anything un-deleted (i.e. the directory is
- not empty) then the directory chain down to the leftover items will
- not be removed even if you asked it to do so. If you respond "no" to
- removing a directory, that directory and all it's contents are left
- alone.
-
- It will always ask before deleting files with special attributes, such
- as a READONLY marked file, unless the -f option is used. The -i, -v and -a
- options are mutually exclusive with the -f option (i.e. they will cancel
- the -f option and -f will cancel the -a, -v and -i options for those items
- following them on the command line).
-
- Command line style arguments may also be passed through the environment
- variable RMOPTS. For example, "set RMOPTS = -v" will cause "rm" to always
- list what it is deleting. File names can also be given in RMOPTS and will
- make "rm" always try to delete the named files. NOTE: arguments given in
- RMOPTS will always be executed first. True command line arguments will
- follow those given in RMOPTS.
-
- USE AT YOUR OWN RISK! A carless "rm -rf \*.*" could just ruin your whole day!
-
- Environment:
- MS/PC-DOS V2.0 or higher. (It has been tested on PC-DOS 4.0.)
-
- Compile:
- Using Microsoft C V4.0 through V5.1 -- "cl -F F000 rm.c -o rm"
- (-F is used to expand the stack size)
-
- Known Bugs (features):
- 1) It will not delete the current directory or the root directory.
- 2) It will not delete directories with anything left in them.
- 3) To remove everything, you must type "*.*" not just "*".
-
- UNIX is a trademark of AT&T.
-
- Mark D. Salzman Phone (206) 253-5542. | The more complex the mind,
- Tektronix Inc., P.O. Box 3500, M/S C1-936 | the greater the need for
- Vancouver, Washington. 98668 | the simplicity of play.
- {world_at_large}!tektronix!tekigm2!marks | James T. Kirk
-
-