I need a script to compare files in a directory to files referenced in web pages.
September 13, 2004 3:37 PM
Subscribe
Can anyone recommend a program (in say perl or java or something) that will execute on my linux web server and a) slurp the file references in the pages (html, php) and b) compare them to the actual files in my web root tree giving me a list of all of the unreferenced files (not referenced on public web pages)? I want to clean up this junky file system, but I don't want to break any links and I inherited the mess. Thanks.
posted by pissfactory to computers & internet (5 comments total)
...or you could use wget, then find and diff, which would be a little more reliable.
posted by sfenders at 3:59 PM on September 13, 2004