Linkfix is a simple tool that helps you avoid the Link rot by reporting on no-longer working links in your files and suggesting replacements with Wayback Machine snapshots wherever possible.
Linkfix can be also used as link availability checker with support for various protocols and complex error reporting.
Link rot is the phenomenon of hyperlinks tending over time to cease to point to their originally targeted file, web page, or server due to that resource being relocated or becoming permanently unavailable. A link that no longer points to its target, often called a broken or dead link, is a specific form of dangling pointer. The rate of link rot is a subject of study and research due to its significance to the internet's ability to preserve information. Estimates of that rate vary dramatically between studies.
- Automatic replacement suggestions for http links by snapshots from Wayback Machine.
- Multithreaded with configurable level of concurrency.
- Multiple output formats.
- Supports various protocols
http
,https
,ftp
,file
.
go get -u github.com/matoous/linkfix
or run using the docker image without installation
docker run --rm -it -u $(id -u):$(id -g) -v $(pwd):/app linkfix -w 4 /app
linkfix .
Advanced usage:
linkfix . --ignore "internal/old_files/**" --verbose --exclude "dont.check.me" --workerks 16 --yes
This will run the linkfix
from current directory, ignoring all files under internal/old_files/
,
in a verbose mode, excluding urls on http://dont.check.me
(e.g. won't try to fix URL that are hosted
on http://dont.check.me
), with 16 workers and will update the links automatically without user confirmation
wherever possible.
- Linkchecker - rich on features and usable on running websites.
- Linkcheck - fast and easy alternative to Linkchecker