To Index

 Documented in Volume 1 of the UNIX Programmers Manual.

  BEWARE: rm is infamously dangerous because rm * happily removes all 
  your files! To avoid being a victim, use the following lines are
  in your .login file:

       alias rem  '/bin/rm -i \!* '
       alias rm 'echo uh, use rem...'
 
  and use the commandname rem instead of rm.


 % rm test.data
  remove the file test.data from the current directory.


 % rm -ir .
  removes (interactively) any file name in the current
  directory. The -i provides interactive mode, the -r
  causes rm not to mask the first byte of the filename,
  (which is often a problem in a garbage filename...)
  and thereby unconditionally present EVERY name.


 % rm testprogs/all*
  remove all files whose names start with 'all' in subdirectory testprogs.


 % rm - -p
  remove a file "-p" that begins with a minus sign.


 % /bin/rm -r dirname
  will erase the contents of the directory named dirname and then delete
  the directory itself.

  This is the command to use for housekeeping your file space.

To Index