home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / question / 15334 < prev    next >
Encoding:
Text File  |  1993-01-08  |  1.2 KB  |  39 lines

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!howland.reston.ans.net!sol.ctr.columbia.edu!ira.uka.de!smurf.sub.org!easix!bc3!ktf
  3. From: ktf@bc3.GUN.de (Klaus ter Fehn)
  4. Subject: Re: Undelete
  5. Organization: private
  6. Date: Fri, 8 Jan 1993 01:25:07 GMT
  7. Message-ID: <C0IH9w.454@bc3.GUN.de>
  8. References: <6JAN199301064871@elroy.uh.edu>
  9. Lines: 28
  10.  
  11. In article <6JAN199301064871@elroy.uh.edu> st1y2@elroy.uh.edu (Gray, William W.) writes:
  12.  
  13.  
  14. >hehhehe, that was one of the first things I learned
  15. >when I moved to UNIX. UNIX o   does not
  16. >have an "undelete" command. But what you can do is write a script file simler to h this and call it del
  17.  
  18.  
  19. >cp %1 /delete/%1
  20. >rm %1
  21. well, if using Bourne or Korn-Shell, I would prefer $1 instead of %1
  22.  
  23. >this should copy the file to /delete and then
  24. >rm r  the file.  Once a week or so you go to /delete
  25. >and carefuly type rm -r *, AND I MEAN CAREFULLY!
  26.  
  27. I'd prefer a crontab-entry in the night:
  28.  
  29. find /delete -type f -atime +7 -exec rm -f {} \;
  30.  
  31. that would delete any file beyond /delete, which was not accessed in the
  32. last 7 days.
  33.  
  34. -- 
  35. Klaus ter Fehn        <ktf@bc3.GUN.de>
  36. Neanderstr. 4        {mcshh,smurf,unido}!easix!bc3!ktf
  37. 4000 Duesseldorf 1
  38. FRG / Germany        Tel.: +49-211-676331
  39.