home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / perl / 5526 < prev    next >
Encoding:
Internet Message Format  |  1992-08-26  |  1.3 KB

  1. Path: sparky!uunet!sun-barr!ames!data.nas.nasa.gov!taligent!apple!autodesk!dansmith
  2. From: dansmith@Autodesk.COM (Daniel Smith)
  3. Newsgroups: comp.lang.perl
  4. Subject: got a symlink checker/chaser for crontab?
  5. Summary: don't want dead links sitting around
  6. Message-ID: <17544@autodesk.COM>
  7. Date: 27 Aug 92 00:43:12 GMT
  8. Organization: Autodesk Inc., Sausalito CA, USA
  9. Lines: 19
  10.  
  11.  
  12.     I often tie together filesystems with symlinks, so that
  13. something like /usr/local/src will contain links which point all
  14. over the place.  Every so often, I try to cd somewhere I haven't
  15. been for weeks, only to find that the link has "dried up".
  16.  
  17.     Well... I basically want a script that will take
  18. "find / -type l -print" and check the links to see if they resolve.  It's
  19. something I'd run once a day out of crontab.  Rather than reinventing
  20. what must be a somewhat common wheel, I thought I'd ask here first.
  21. The script would produce a list of symlinks in need of updating/deletion,
  22. which presumably would get piped into mail.
  23.  
  24.                 Daniel
  25. -- 
  26.             dansmith@autodesk.com            dansmith@well.sf.ca.us
  27.         Daniel Smith, Autodesk, Sausalito, California, (415) 332-2344 x 2580
  28.               Disclaimer: written by a highly caffeinated mammal
  29.  $|=1;for("..."," hacker"," perl"," a","just"){print $l=$_.$l,"\015";sleep 1;}
  30.