Linklint: old-school link checking


#1

Linklint is an Open Source Perl program that checks links on web sites. It is licensed under the Gnu General Public License. http://www.linklint.org/

Linklint hasn’t changed since 2001, but its still a great little tool for kicking off a detailed link check for any web site. It’s a Perl app so you’ll need a suitable environment to get things going.

Here’s what I do on my Mac:

Install using the Brew package manager.

$ brew install linklint
==> Downloading http://linklint.org/download/linklint-2.3.5.tar.gz
######################################################################## 100.0%
🍺  /usr/local/Cellar/linklint/2.3.5: 5 files, 164K, built in 2 seconds

Linklint for basic help.

$ linklint
This is linklint Version 2.3.5 (August 13, 2001)
Copyright (c) 1997-2001 James B. Bowlin

Usage: linklint @file @@file -flag [option] linkset linkset ...

  -root dir         Set server root to  "dir" (default ".").
  -host name[:port] Use "name" as domain name of site.
  -http             Check site remotely via http (requires -host).
  -net              Check status of remote http links found in site.
  -help             Show help. (Use "-help_all" for complete usage).                          
  -version          Show version info.

Multi File Output:
  -doc dir          Write many output files in "dir" directory.

Single File Output:
  -error  print errors          -out file      direct output to "file"
  -warn   print warnings        -xref          cross reference
  -list   print files found     -forward       sort by referring file

linkset:
  home page only: /  (default)                   root dir only: /#
  entire site: /@                           and all subdirs: /#/#
  specific links: /link1 /link2 ...        "sub" dir and below: /sub/@ 

Setting up a link checking session can be done direct from the command line. More extensive options can be configured by referencing a config file.

Create a home for linklint reports.

$ mkdir linklint
$ cd linklint/

Run a report.

$  linklint -http -host www.daemon.com.au /@ -doc daemon.com.au

Checking links via http://www.daemon.com.au
that match: /@
1 seed: /

Seed:    /
    checking robots.txt for www.daemon.com.au
Checking /
Checking /case-studies
Checking /case-study/photo-and-imaging-news
Checking /solutions
Checking /solutions/digital-strategy

...8<...SNIP...8<...

Processing ...

writing files to daemon.com.au
wrote 19 txt files
wrote 17 html files
wrote index file index.html

found   1 default index
found 113 other files
found 543 http links
found  11 https links
found   8 unknown links
found   1 named anchor
warn    9 warnings
ERROR   8 missing image files
ERROR   1 missing audio file
ERROR  20 missing other files
ERROR  19 missing named anchors

Linklint found 114 files and checked 102 html files.
There were 29 missing files. 34 files had broken links.
48 errors, 9 warnings.

This example generates an HTML and text report in a folder called ./daemon.com.au.

./daemon.com.au
├── anchor.html
├── anchor.txt
├── anchorX.html
├── anchorX.txt
├── error.html
├── error.txt
├── errorA.html
├── errorA.txt
├── errorAX.html
├── errorAX.txt
├── errorF.html
├── errorF.txt
├── errorX.html
├── errorX.txt
├── file.html
├── file.txt
├── fileF.html
├── fileF.txt
├── fileX.html
├── fileX.txt
├── httpfail.html
├── httpfail.txt
├── httpok.html
├── httpok.txt
├── index.html
├── index.txt
├── log.txt
├── remote.html
├── remote.txt
├── remoteX.html
├── remoteX.txt
├── summary.txt
├── warn.html
├── warn.txt
├── warnF.html
├── warnF.txt
├── warnX.html
└── warnX.txt

The HTML reports look pretty basic, but the data is gold :smile:


Enjoy!