LINKLINT(1)
π LINKLINT(1) β the manual, but make it make sense π
okay so bestie, welcome to LINKLINT(1) from the User Contributed Perl Documentation section. This is Linklint: a fast link checker and website maintenance tool. She's giving utility, she's giving speed, she's giving iconic. π
β¨
β¨ NAME β¨
Linklint β fast link checker and website maintenance tool. periodt π
πΈ SYNOPSIS πΈ
linklint [-cache directory] [-case] [-checksum] [-concise_url] [-db1..9]
[-delay d] [-doc] [-docbase base] [-dont_output xxxx] [-error] [-flush]
[-forward] [-help] [-help_all] [-host hostname:port] [-host hostname]
[-htmlonly] [-http] [-http_header name:value] [-ignore ignoreset]
[-index file] [-language zz] [-limit n] [-list] [-local linkset] [-map
/a=[/b]] [-net] [-netmod] [-netset] [-no_anchors] [-no_query_string]
[-no_warn_index] [-orphan] [-out file] [-output_frames]
[-output_index filename] [-password realm user:password] [-proxy
hostname[:port]] [-quiet] [-redirect] [-retry] [-silent] [-skip skipset]
[-textonly] [-timeout t] [-url_doc_prefix url/] [-version] [-warn] [-xref]
linkset
π VERSION π
2.3.5 August 13, 2001 β yes bestie, she's vintage and still serving. ππ
π¦ DESCRIPTION π¦
This manual page documents briefly the Linklint program, which is an Open Source Perl program that checks local and remote HTML links.
This manual page was written for the Debian distribution because the original program does not have a manual page. Instead, it has documentation in the HTML format; see below.
π₯ OPTIONS π₯
π Input File Selection π
Whether you are doing a local site check or an HTTP site check, you specify which directories (presumably containing HTML files) to check with one or more linksets. A linkset uses two wildcard characters @ and #. Each linkset specifies one or more directories much like the standard * and ? wildcard characters are used to specify the characters in the names of files in one directory.
The @ character matches any string of characters (this kind of acts like *), and the # character (which is kind of like ?) matches any string of characters except /. The best way to understand how @ and # work is to look at a few examples:
the entire site /@
the homepage only (default) /
files in the root directory only /#
. . . and one directory down /#/#
files in the sub directory only /sub/#
files in the sub directory and below /sub/@
specific files /file1 /file2 ...
specific subdirectories /sub1/@ /sub2/@ ...
If you specify more than one linkset, files matching any of the linksets will be checked. HTML files that don't match any of the linksets will be skipped. Linklint will see if they exist but won't check any of their links.
π Other File Selection Options π
-skip skipsetβ Skips HTML files that matchskipset. Linklint will make sure these files exist but won't add any of their links to the list of files to check. Multiple skipsets are allowed, but each must be preceded with-skipon the command line. Skipsets use the same wildcard characters as linksets.-ignore ignoresetβ Ignores files matchingignoreset. Linklint doesn't even check to see if these files exist. Multiple ignoresets are allowed, but each must be preceded with-ignoreon the command line. Ignoresets use the same wildcard characters as linksets.-limit nβ Limits checking tonHTML files (default500). All HTML files after the firstnare skipped. budget-friendly checking, bestie π
π Local Site Checking π
If you are developing HTML pages on a computer that does not have an http server, or if you are developing a simple site that does not use Server Redirection or extensive CGI, you should use local site checking.
linklint /@
Checks all HTML files in the current directory and below. Assumes that the current directory is the server root directory so links starting with / default to this directory. You must specify /@ to check the entire site. See Which Files to Check for details.
linklint -root dir /@
Checks all HTML files in dir and below. This is useful if you want to check several sites on the same machine or if you don't want to run Linklint in your public HTML directory.
π Other Local Site Options π
-host hostnameβ By defaultLinklintassumes all links on your site that start withhttp://are remote links to other sites. If you have absolute links to your own site, giveLinklintyour hostname and links starting withhttp://hostnamewill be treated as local files. If you specify-host hostname:port, only http links to this hostname and port will be treated as local files.-caseβ Makes sure that the filename (upper/lower) case used links inside of html tags matches the case used by the file system. This is for Windows only and is very handy if you are porting a site to a Unix host. case-sensitive chaos, but make it organized π-orphanβ Checks all directories that contain files used on the site for unused (orphan) files.-index fileβ Usesfileas the default index file instead of the default list used byLinklint. You can specify more than one file but each one must be preceded by-indexon the command line. If a default index file is not found,Linklintuses a listing of the entire directory. See the Default File section for details.-map /a=[/b]β Substitutes leading/awith/b. For server-side image maps or to simulate Server Redirection.-no_warn_indexβ Turns off the "index file not found" warning. Applies to local site checking only.-no_anchorsβ TellsLinklintto ignore named anchors. This could ease memory problems for people with large sites who are primarily interested in missing pages and not missing named anchors. This option works for both HTTP and local site checks.
π HTTP Site Checking π
If you have a complicated site that uses lots of CGI or Server Redirection, you should use HTTP site checking. Even though an HTTP site check reads pages via your HTTP server, you will get the best performance if you do your checking on a machine that has a high speed connection to your server.
linklint -http -host www.site.com /@
The -http flag tells Linklint to check HTML files on the site www.site.com via a remote http connection. You must specify a -host whenever you do an HTTP site check (otherwise Linklint won't where to get your pages). You can specify /@ to check the entire site. See Which Files to Check for details.
π HTTP Site Check Options π
-httpβ This flag tells Linklint to perform an HTTP site check instead of a local site check. All files (except server side image maps) will be read via the HTTP protocol from your web server.-host hostname:portβ If you include:portat the end of your hostname, Linklint uses this port for the HTTP site check.-password realm user:passwordβ Usesuserandpasswordas authorization to enter password protectedrealm. Realms are named areas of a site that share a common set of usernames and passwords. If passwords are needed to check your site, Linklint will tell you which realms need passwords in warning messages. Enclose the realm in double quotes if it contains spaces. If no password is given for a specific realm, Linklint will try using the password for the""DEFAULT""realm if it was provided. secret garden but for auth π-timeout tβ Times out aftertseconds (default15) when getting files via http. Once data is received, an additionaltseconds is allowed. The timeout is disabled on Windows machines since the Windows port of Perl does not support thealarm()function.-delay dβ Delaysdseconds between requests to the same host (default0). This is a friendly thing to do especially if you are checking many links on the same host. be polite, bestie πΈ-local linksetβ Gets files that matchlinksetlocally. The default-local linksetis@.map(which matches any link ending in.map). This allows Linklint to follow links through server-side image maps. The default is ignored if you specify your own-localexpressions. You need to specify the-rootdirectory for this option to work properly.-map /a=[/b]β Substitutes leading/awith/b. For server-side image maps or to simulate Server Redirection.-no_anchorsβ TellsLinklintto ignore named anchors.-no_query_stringβ Up until version2.3.4, Linklint did not use query strings while doing HTTP site checks. Query strings were removed before making HTTP requests. As of2.3.4query strings in links are used in the requests. Use the-no_query_stringflag to get back the "old" behavior. throwback mode π°οΈ-http_header Name:valueβ Adds the HTTP headerName: valueto all HTTP requests generated by Linklint. You will need to use quotation marks to hide spaces in the header line from the command line interpreter. Linklint will automatically add a space after the first colon if there is not one there already. Multiple (unique) header lines are allowed.-language zzβ This option is only useful if you are checking a site that uses content negotiation to present the same URL in different languages.
Creates an HTTP Request header of the form Accept-Language: zz that is included as part of all HTTP requests generated by Linklint. Multiple -language specifications are allowed. This will result in a single Accept-Language: header that lists all of the languages you have specified in alphabetical order. Some web sites can use this information to return pages to you in a specific language.
If you need to get more complicated than this, use the more general purpose -http_header to create your own header. There is a partial list of language abbreviations (taken from Debian) included as part of the Linklint documentation.
π Remote URL Checking π
A remote URL check is used to see if a remote URL exists (or has been recently modified). Links in the remote pages are not checked nor does Linklint look for named anchors in remote URLs.
Remote URL checking can be used to check all of the "remote" links on your site (those that link to pages on other sites) or it can check a list of URLs. There are several ways to specify which remote URLs to check:
linklint http://somehost/file.html
Checks to see if /file.html exists on somehost. Multiple URLs can be entered on the command line, in an @commandfile, or in an @@httpfile. Every URL to be checked must begin with "http://". This will disable site checking.
linklint @@httpfile
Checks all the remote http URLs found in httpfile. Anything in the file starting with "http://" is considered to be a URL. If the file looks like a remoteX.txt file generated by Linklint then all failed URLs will be cross referenced.
linklint @@ -doc linkdoc
Assuming you already did a site check and used -doc linkdoc to dump all your output files into the linkdoc directory, Linklint will check every single remote link it found on your site and cross-reference all the failed URLs β no site check required. Want the status cache on? Just flip on the -netmod or -netset flags. Easy.
linklint -net [site check options]
So what's -net actually doing? It tells Linklint to check all your remote links after it finishes either a local or an HTTP site check. And heads up bestie: if you're having memory problems, do not use -net β use one of the @@ options listed above instead. Your RAM will thank you. π«Ά
π Other Remote URL Options
-timeout tβ Times out aftertseconds (default15) when grabbing files over http. And once data actually starts coming in, you get an extratseconds on top of that. On Windows machines this timeout is disabled entirely, because the Windows port of Perl doesn't support thealarm()function. Not her fault, that's just the port. π-delay dβ Waitsdseconds between requests to the same host (default0). This is the polite, friendly, good-neighbor thing to do, especially when you're checking a ton of links on one host. Be nice to servers, they remember. β¨-redirectβ Checks for<meta>redirects in the headers of remote URLs that are html files. Found one? She follows it. π¦ Just know this feature is disabled if the status cache is being used.-proxy hostname[:port]β Sends every remote HTTP request through the proxy serverhostnameand the optionalport. This lets you check remote URLs β or, new with version 2.3.1, your entire site β from inside a firewall that has an http proxy server. One caveat: some error messages (the ones relating to host errors) may not be available through a proxy server.-concise_urlβ Turns off printing successful URLs toSTDOUTwhile remote link checking is happening. Silence is golden, etc.
ποΈ Status Cache Options
Okay so the Status Cache is a very powerful feature, and I need you to understand it. It lets you keep track of recent changes in all the remote (off-site) pages you link to. Then you can use the Linklint output files to quickly check the changed pages and see if they still meet your needs. Obsessed, honestly.
The flags below all make use of the status cache file linklint.url, which lives in your HOME or LINKLINT directory. That file keeps track of the modification dates of all the remote URLs you check. π
-netmodβ Works exactly like-net, except it uses the status cache. Newly checked URLs get entered into the cache. Linklint will tell you which (previously cached) URLs have been modified since the last-netset.-netsetβ Like-netmod, but it also resets the last modified status in the cache for all URLs that checked ok. If you always use-netset, modified URLs get reported just once. One and done, periodt.-retryβ Only checks URLs that have a host fail status in the cache. Sometimes a URL fails because its host is just temporarily down, you know? This flag lets you recheck only those links. The easy way to recheck all cached URLs with host failures islinklint @@ -retry. And if you want failed URLs cross referenced, uselinklint @@linkdoc/remoteX.txt -retry.-flushβ Removes all URLs from the cache that are not currently being checked. Note that the-retryflag has no effect on which URLs get flushed. Different flag, different job.-checksumβ Makes sure every URL that has been modified is reported as such. Warning though: this flag can make the remote checking take longer. π Also, a lot of the pages that require a checksum are dynamically generated and will always be reported as modified. That's just how they are.-cache directoryβ Reads and writes thelinklint.urlcache file indirectory. The default directory is set by yourLINKLINTorHOMEenvironment variables.
π Output Options
By default? No output files are generated at all. Only progress and a brief summary of the results get printed to the screen. If you want more, you can produce complete documentation (split up into separate files) in a -doc directory, or put selected output in a single -out file, or just redirect the standard output to a file. See the Output File Specification section for the detailed breakdown of every output file.
ποΈ Multi File Output
-doc linkdocβ Sends all output to thelinkdocdirectory. The output is split into separate.txtand.htmlfiles. Complete documentation is always produced regardless of the single file flags. The fileindex.txtcontains an index to all the other files, andindex.htmlis the HTML version of that index. For remote URL checking, the index files areur_lindex.txtandurl_index.html.-textonlyβ Prevents any HTML files from being created in the-docdirectory. Text girlies rise up. π-htmlonlyβ Erases redundant text files in the-docdirectory after they've been used to create the HTML output files.remote.txtandremoteX.txtare NOT erased, since Linklint can use them to recheck remote URLs.-docbase baseβ Overrides the default base expression used for directing a browser to the resources listed in the output HTML files. Thebasegets prepended to local links in the output HTML files. Important: this only affects the links in the HTML output files, it has no effect on what's displayed in those files. Ordinarily you'd only use this flag during a local site check to set the base tohttp://host.-output_framesβ All HTML output data files are linked to fromindex.html. With this flag, the data files open up in a new frame (window), which is handy in some cases since it always leavesindex.htmlopen in its own window. Multi-tasking queen. π-output_index filenameβ The output index files used to be namedlinklint.txtandlinklint.html. They've now been changed toindex.txtandindex.html. You can use-output_indexto change that name back to"linklint"or to something else entirely.-url_doc_prefix url/β By default, the output files associated with remote URL checking all start with"url". You can change that with-url_doc_prefix. And if theurl_doc_prefixcontains a/character, the appropriate directory gets created as a subdirectory of the-docdirectory. β¨-dont_output xxxxβ Don't create output files that contain"xxxx". Can be repeated. Example:
-dont_output "X$"
...will supress the output of all cross reference files.
π Single File Output
-errorβ Lists missing files and other errors. The drama list, basically.-out fileβ Sends list output and summary information tofile.-listβ Lists all found files, links, directories, etc.-warnβ Lists all warnings.-xrefβ Adds cross references to the lists.-forwardβ Sorts lists by referring file.
π Debug and other Flags
-db1β Debugs command line input and linkset expressions.-db2β Prints the name of every file that gets checked (not just HTML files).-db3β Debugs the HTML parser, prints out tags and the resulting links.-db4β Debugs socket connection (kind of).-db5β Not used. She's just sitting there. Chilling. π-db6β Details last-modified status for remote URLs (requires-netsetor-netmod).-db7β Prints brief debug information while checking remote URLs.-db8β Prints all http headers while checking remote URLs.-db9β Generates random http errors. Yes really. Chaos mode activated, no notes. π-versionβ Gives version information.-helpβ Lists a few simple examples of how to use Linklint.-help_allβ Lists all help (contained in the program) including every input option. The full lore drop. π-quietβ Disables printing progress to the screen.-silentβ Disables printing summarys to the screen.
π AUTHOR
Linklint is written by James B. Bowlin <jbowlin@linklint.org>. This manual page was written by Denis Barbier <barbier@debian.org> for the Debian system (but may be used by others), by cut'n'paste from original documentation written in HTML. Iconic behavior, honestly. π«Ά
And that's a wrap, bestie! π This page ships with perl v5.40.0 and is dated 2024-11-05 β go forth and check those links, you absolute main character. πβ¨
π¦ where this page comes from
- debian trixie: linklint 2.3.5-8 Β· GPL-2.0-or-later
- ubuntu resolute: linklint 2.3.5-8 Β· GPL-2.0-or-later
- ubuntu stonking: linklint 2.3.5-8 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms