home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / msdos / dirutl / mds_rm.arc / RM.DOC < prev    next >
Encoding:
Text File  |  1988-08-30  |  2.8 KB  |  66 lines

  1.  
  2.       RM.C                        Version 4.1
  3.  
  4.  Description:
  5.  This program simulates the UNIX "rm" command. It allows one to remove
  6.  files and/or directory structures with ease. It will also hunt for and
  7.  allow you to remove files with special attributes (like hidden or system
  8.  files). The command line goes like:
  9.  
  10.     RM [-iravf] file_or_directory_name(s)
  11.  
  12.     -i    Inquire before delete mode.
  13.      -r    Recursively delete directory structures.
  14.     -a    Inquire before deleting files that have the archive bit set.
  15.     -v    Verbose mode, list files and directories as they are removed.
  16.     -f    Remove without prompting or complaining.
  17.  
  18.  The option flags apply only to those items that follow them on the
  19.  command line. For instance:
  20.  
  21.             rm dumb.txt -r dumbdir -i a:gooddir
  22.  
  23.  will delete "dumb.txt", then recursively delete "dumbdir" and all it's
  24.  contents, then ask before recursively deleting "a:gooddir". If you say
  25.  "yes", it will then stop on each item in "a:gooddir" and ask before
  26.  deleting it. If you leave anything un-deleted (i.e. the directory is
  27.  not empty) then the directory chain down to the leftover items will
  28.  not be removed even if you asked it to do so. If you respond "no" to
  29.  removing a directory, that directory and all it's contents are left
  30.  alone.
  31.  
  32.  It will always ask before deleting files with special attributes, such
  33.  as a READONLY marked file, unless the -f option is used. The -i, -v and -a
  34.  options are mutually exclusive with the -f option (i.e. they will cancel
  35.  the -f option and -f will cancel the -a, -v and -i options for those items
  36.  following them on the command line).
  37.  
  38.  Command line style arguments may also be passed through the environment
  39.  variable RMOPTS. For example, "set RMOPTS = -v" will cause "rm" to always
  40.  list what it is deleting. File names can also be given in RMOPTS and will
  41.  make "rm" always try to delete the named files. NOTE: arguments given in
  42.  RMOPTS will always be executed first. True command line arguments will
  43.  follow those given in RMOPTS.
  44.  
  45.  USE AT YOUR OWN RISK! A carless "rm -rf \*.*" could just ruin your whole day!
  46.  
  47.  Environment:
  48.  MS/PC-DOS V2.0 or higher. (It has been tested on PC-DOS 4.0.)
  49.  
  50.  Compile:
  51.  Using Microsoft C V4.0 through V5.1 -- "cl -F F000 rm.c -o rm"
  52.         (-F is used to expand the stack size)
  53.  
  54.  Known Bugs (features):
  55.  1) It will not delete the current directory or the root directory.
  56.  2) It will not delete directories with anything left in them.
  57.  3) To remove everything, you must type "*.*" not just "*".
  58.  
  59.  UNIX is a trademark of AT&T.
  60.  
  61.  Mark D. Salzman     Phone (206) 253-5542.  |  The more complex the mind,
  62.  Tektronix Inc., P.O. Box 3500, M/S C1-936  |  the greater the need for 
  63.  Vancouver, Washington. 98668               |  the simplicity of play.
  64.  {world_at_large}!tektronix!tekigm2!marks   |       James T. Kirk
  65.  
  66.