fix-link - identify files affected by a link change and fix them

SYNOPSIS [arguments] old-link new-link


This program is designed to change one uri to another one throughout an infostructure (group of interlinked files). Normally the program uses an index built up for link testing to make this operation fast by examining only those files which have links needing changed.

This program is not designed to run SUID. Instead the user is meant to have access to the files that are to be changed.


Find Files by directory

Goes through all of the files in a directory. It changes checks all files to see if they need to be changed.

Find Files by index file

Goes through the index file looking for all URIs that need to be corrected then corrects those.


Do simple textual substitutions

Here we just substitute string for string. See "HOW IT WORKS" below.

Do file parsing to find uris

Not yet implemented. Here we go through each file parsing it properly. This is the only way for binary formats.


With the --relative option we can search for relative links. This is more dangerous (more chance of a false match) and slower, but will be needed if you move files within your own web pages and need to correct links to them.


This discussion covers how we do substitution in HTML documents. It's a bit out of date.

The proper way to do this is to parse each bit of the document, then identify the links, convert them to the most cannonical form possible and compare them to the original uri. If they match then replace them with the new one (possibly in a relative form).

This is great if:- a) your document is not broken

  b) you don't have any links outside the link text (more common than
  you would like to imagine, think of every `we have changed to a new
  site' notice)

So we resort to the following brute force approach:-

  a) if it looks like the original absolute link substitute it no
  matter what.

  b) if it looks like the relative form and seems to be in an
  attribute substitute it and warn what we are doing.

  c) if it looks like the relative form, but isn't in an attribute
  then bitch about it, but do nothing.

Your files should

  a) have the right level of quoting

  b) not have any uris containing [stuff]/fred/../[stuff]


Add extra formats.


verify-link-control(1); extract-links(1); build-schedule link-report(1); fix-link(1); link-report.cgi(1); fix-link.cgi suggest(1); link-report.cgi(1); configure-link-control

The LinkController manual in the distribution in HTML, info, or postscript formats, included in the distribution. - the LinkController homepage.