正體中文 | 简体中文 | English

:::

chklinks

Description

chklinks is a non-threaded Perl link checker. It helps finding broken links on your website.

chklinks differs from linkchecker in that chklinks is non-threaded. It does not raises many simultaneously connections for its job. It won’t run out of the resources and crash your system in a moment. This is certainly more desirable for most webmasters and users.

chklinks follows robots.txt rules. If you disallow robots from your website and experience problems, you need to allow chklinks. Add the following lines to your robots.txt file to allow chklinks:

User-agent: chklinks
Disallow:

chklinks uses LWP::RobotUA and support the following schemes: http, https, ftp, gopher and file. You can also specify a local file. (To use https, you need to install Crypt::SSLeay. This is the requirement of LWP::RobotUA.)

chklinks supports cookies.

Options

./chklinks [options] URL1 [URL2 [URL3 …]]
./chklinks [-h|-v]
-1,--onelevel

Check the links on this page and stops.

-r,--recursive

Recursively check through this website. This is the default.

-b,--below

Only check the links below this directory. This is the default.

-p,--parent

Trace back to the parent directories.

-l,--local

Only check the links on this same host.

-s,--span

Check the links to other hosts (without recursion). This is the default.

-e,--exclude path

Exclude this path. Check for their existence but not check the links on them, just like they are on a foreign site. Multiple --exclude are OK.

-i,--include path

Include this path. An opposite of --exclude that cancels its effect. The latter specified has a higher priority.

-d,--debug

Display debug messages. Multiple --debug to debug more.

-q,--quiet

Disable debug messages. An opposite that cancels the effect of --debug.

-h, --help

Display the help message and exit.

-v, --version

Output version information and exit.

URL1, URL2, URL3

The URLs of the websites to check against.

Notes

See Also

LWP::UserAgent, LWP::RobotUA, WWW::RobotRules, URI, HTML::LinkExtor, Bastian Kleineidam’s linkchecker and W3C-LinkChecker checklink.

By imacat, first version 2003-05-25, last updated 2009-04-19