home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / sys5 / r4 / 1003 < prev    next >
Encoding:
Text File  |  1992-12-24  |  2.4 KB  |  92 lines

  1. Newsgroups: comp.unix.sys5.r4
  2. Path: sparky!uunet!gatech!destroyer!mudos!mju
  3. From: mju@mudos.ann-arbor.mi.us (Marc Unangst)
  4. Subject: Re: What is lacking in UNIX? (Re: UNIVEL MUST BE KIDDING!!!!!)
  5. Message-ID: <BzsoHx.85u@mudos.ann-arbor.mi.us>
  6. Date: Fri, 25 Dec 1992 03:03:33 GMT
  7. References: <id.0R2W.M24@ferranti.com> <Bzqv2E.Ln8@mudos.ann-arbor.mi.us> <sheldon.725236041@pv141b.vincent.iastate.edu>
  8. Organization: The Programmer's Pit Stop, Ann Arbor MI
  9. Lines: 81
  10.  
  11. In article <sheldon.725236041@pv141b.vincent.iastate.edu> sheldon@iastate.edu (Steve Sheldon) writes:
  12. > del c:\command.com
  13. >
  14. > Insert the appropriate "Oh %*^(, why'd I do that?"
  15. >
  16. > And which point you type:
  17. >
  18. > undelete c:\command.com
  19. >
  20. > And off we go again...
  21.  
  22. del c:\command.com
  23.  
  24. Wait several hours while you use the machine heavily, creating and
  25. removing files.
  26.  
  27. Then try to undelete command.com.  Or, just reboot the computer
  28. between the time you remove it and the time you restore it.  At least
  29. Unix can boot an alternate kernel if you really want to.
  30.  
  31. Oh, fine, if you insist.
  32.  
  33. $ rm() {
  34. for i in $*; do
  35.     mv $i `dirname $i`/._deleted_.`basename $i`
  36. done
  37. }
  38. $ unrm() {
  39. for i in $*; do
  40.     rmname=`dirname $i`/._deleted_.`basename $i`
  41.     if [ -f $rmname ]; then
  42.         mv $rmname $i
  43.     else
  44.         echo "Sorry, $i cannot be restored."
  45.     fi
  46. done
  47. }
  48. $ rm_i_really_mean_it_do_it_now() {
  49. for i in $*; do
  50.     echo "Are you really sure you want to remove $i? \c"
  51.     read ans
  52.     case $ans in
  53.         [yY]*)    ;;
  54.         *)    exit ;;
  55.     esac
  56.     echo "Really? \c"
  57.     read ans
  58.     case $ans in
  59.         Yes)    ;;
  60.         *)    exit ;;
  61.     esac
  62.     echo "\
  63. You're really sure about this, then.  Well, okay, but I'll wait 10\n\
  64. seconds before I actually do it to give you a chance to change your\n\
  65. mind.  Sleeping..."
  66.     sleep 15    # give 'em a little extra margin
  67.     rm $i
  68. done
  69. }
  70. $ rm /vmunix
  71. [insert appropriate #@$!% comments]
  72. $ unrm /vmunix
  73. $ ls /vmunix
  74. /vmunix
  75. $ rm_i_really_mean_it_do_it_now /vmunix
  76. Are you really sure you want to remove /vmunix? y
  77. Really? Yes
  78. You're really sure about this, then.  Well, okay, but I'll wait 10
  79. seconds before I actually do it to give you a chance to change your
  80. mind.  Sleeping...
  81. [15 seconds later...]
  82. $ unrm /vmunix
  83. $ ls /vmunix
  84. /vmunix
  85.  
  86. -- 
  87. Marc Unangst, N8VRH         | "Of course, in order to understand this you
  88. mju@mudos.ann-arbor.mi.us   |  have to remember that the nucleus of the atom
  89.                             |  is squishy."
  90.                             |    -W. Scheider, from a Physics lecture
  91.