home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / linux / 6555 < prev    next >
Encoding:
Text File  |  1992-07-23  |  1.8 KB  |  45 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!mcsun!sunic!kth.se!news.kth.se!krej
  3. From: krej@electrum.kth.se (Kristian Ejvind)
  4. Subject: Changeing behaviour of rm
  5. In-Reply-To: dje@sspiff.ampr.ab.ca's message of Thu, 23 Jul 1992 14:53:32 GMT
  6. Message-ID: <KREJ.92Jul23214225@gaia.electrum.kth.se>
  7. Sender: usenet@kth.se (Usenet)
  8. Nntp-Posting-Host: gaia.electrum.kth.se
  9. Organization: The Royal Institute of Technology, Stockholm, Sweden
  10. References: <9TP8NB3w165w@ssg.com> <1992Jul23.145332.1393@sspiff.ampr.ab.ca>
  11. Date: Thu, 23 Jul 1992 20:42:25 GMT
  12. Lines: 31
  13.  
  14.  
  15. In article <1992Jul23.145332.1393@sspiff.ampr.ab.ca> dje@sspiff.ampr.ab.ca (Doug Evans) writes:
  16.  
  17. >                  Some people have versions of rm that work like the
  18. >   Macintosh trash can: the deleted files get moved to a temporary place
  19. >   so they can be recovered if the deletion was in error.
  20. >   But "rm" as shipped doesn't work like that.
  21. >
  22. >   You're only human and you *will* delete a file or make some other
  23. >   silly mistake. Use the protection features of the o/s to protect
  24. >   you from yourself.
  25. >   -- 
  26. >   Doug Evans               | "You're just supposed to sit here?"
  27. >   dje@sspiff.ampr.ab.ca    |               - Worf in a mud bath.
  28.  
  29. A rm with this behaviour is *easy* to create (at least if you're in
  30. tcsh as I am..):
  31.  
  32. alias rm 'mv \!* ~/.wastebin'
  33.  
  34. this will move your deleted files to the directory .wastebin (which 
  35. you have to create first!). I have had in my plans for a while (on 
  36. second thought, a very long while :-) to add a few lines to my .login
  37. to 1) alias rm as above and 2) check ~/.wastebin for size and revome
  38. the oldest files,  but I reccon I will do that first after I deleted
  39. THAT VERY important file........
  40.  
  41. /Kristian
  42.  
  43. p.s. When rm is aliased as above, rm's options won't work (exept for -f)!
  44.       
  45.