22  Welcome,  New  User!  Date:  Wed,  10  Jan  90  15:51  CST  From:  ram@attcan.uucp  Subject:  Re:  rm  *  Newsgroups:  alt.folklore.computers  I  too  have  had  a  similar  disaster  using  rm.  Once  I  was  removing  a  file  system  from  my  disk  which  was  something  like  /usr/foo/bin.  I  was  in  /  usr/foo  and  had  removed  several  parts  of  the  system  by:  %  rm  -r  ./etc  %  rm  -r  ./adm  …and  so  on.  But  when  it  came  time  to  do  ./bin,  I  missed  the  period.  System  didn’t  like  that  too  much.  Unix  wasn’t  designed  to  live  after  the  mortal  blow  of  losing  its  /bin  direc-  tory.  An  intelligent  operating  system  would  have  given  the  user  a  chance  to  recover  (or  at  least  confirm  whether  he  really  wanted  to  render  the  operat-  ing  system  inoperable).  Unix  aficionados  accept  occasional  file  deletion  as  normal.  For  example,  consider  following  excerpt  from  the  comp.unix.questions  FAQ:3  6)  How  do  I  “undelete”  a  file?  Someday,  you  are  going  to  accidentally  type  something  like:  %  rm  *  .foo  and  find  you  just  deleted  “*”  instead  of  “*.foo”.  Consider  it  a  rite  of  passage.  Of  course,  any  decent  systems  administrator  should  be  doing  regular  backups.  Check  with  your  sysadmin  to  see  if  a  recent  backup  copy  of  your  file  is  available.  “A  rite  of  passage”?  In  no  other  industry  could  a  manufacturer  take  such  a  cavalier  attitude  toward  a  faulty  product.  “But  your  honor,  the  exploding  gas  tank  was  just  a  rite  of  passage.”  “Ladies  and  gentlemen  of  the  jury,  we  will  prove  that  the  damage  caused  by  the  failure  of  the  safety  catch  on  our  3comp.unix.questions  is  an  international  bulletin-board  where  users  new  to  the  Unix  Gulag  ask  questions  of  others  who  have  been  there  so  long  that  they  don’t  know  of  any  other  world.  The  FAQ  is  a  list  of  Frequently  Asked  Questions  gar-  nered  from  the  reports  of  the  multitudes  shooting  themselves  in  the  feet.  
Accidents  Will  Happen  23  chainsaw  was  just  a  rite  of  passage  for  its  users.”  “May  it  please  the  court,  we  will  show  that  getting  bilked  of  their  life  savings  by  Mr.  Keating  was  just  a  rite  of  passage  for  those  retirees.”  Right.  Changing  rm’s  Behavior  Is  Not  an  Option  After  being  bitten  by  rm  a  few  times,  the  impulse  rises  to  alias  the  rm  com-  mand  so  that  it  does  an  “rm  -i”  or,  better  yet,  to  replace  the  rm  command  with  a  program  that  moves  the  files  to  be  deleted  to  a  special  hidden  direc-  tory,  such  as  ~/.deleted.  These  tricks  lull  innocent  users  into  a  false  sense  of  security.  Date:  Mon,  16  Apr  90  18:46:33  199  From:  Phil  Agre  agre@gargoyle.uchicago.edu  To:  UNIX-HATERS  Subject:  deletion  On  our  system,  “rm”  doesn’t  delete  the  file,  rather  it  renames  in  some  obscure  way  the  file  so  that  something  called  “undelete”  (not  “unrm”)  can  get  it  back.  This  has  made  me  somewhat  incautious  about  deleting  files,  since  of  course  I  can  always  undelete  them.  Well,  no  I  can’t.  The  Delete  File  command  in  Emacs  doesn’t  work  this  way,  nor  does  the  D  command  in  Dired.  This,  of  course,  is  because  the  undeletion  protocol  is  not  part  of  the  operating  system’s  model  of  files  but  simply  part  of  a  kludge  someone  put  in  a  shell  command  that  happens  to  be  called  “rm.”  As  a  result,  I  have  to  keep  two  separate  concepts  in  my  head,  “delet-  ing”  a  file  and  “rm’ing”  it,  and  remind  myself  of  which  of  the  two  of  them  I  am  actually  performing  when  my  head  says  to  my  hands  “delete  it.”  Some  Unix  experts  follow  Phil’s  argument  to  its  logical  absurdity  and  maintain  that  it  is  better  not  to  make  commands  like  rm  even  a  slight  bit  friendly.  They  argue,  though  not  quite  in  the  terms  we  use,  that  trying  to  make  Unix  friendlier,  to  give  it  basic  amenities,  will  actually  make  it  worse.  Unfortunately,  they  are  right.  
            
            






































































































































































































































































































































































