We have an old website that has a lot of cruft, and I have been asked to write a script that finds the cruft. Specifically, the "cruft" I seek is any file that does not have a link to it within a website. Say I am working with http://example.com/it/, and the files are located on the Unix box itself at /www/docs/it/ I want to extract all the links from any .htm and .html files underneath the it/ subweb and store them. Then I'm thinking I should turn those into absolute pathnames. Finally I should check each file recursively underneath the /www/docs/it/ directory and report if I don't have a reference to it.

Now here's my problem: I don't have admin rights to the Unix box, so I can only install Perl modules like HTML::LinkExtractor locally to my Windoze box with Cygwin. The problem is that I need to be able to get directory listings remotely... Any insight?

(ps: Sorry I don't have any code to start with - I feel bad about this - but this one is a real stumper.)


In reply to Finding files on a website that have been orphaned by aarestad

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.