What is Lynx?

Well, this is a text-based browser. You can do browsing on the command prompt using 'lynx' command. Advantage of this browser is that it can be used in non-interactive manner in your scripts to do a certain task. For more information on this nice command and its options see the man pages. Following are some examples on usage of this command

lynx http://address_of_the_website

The following command downloads all the web pages of a website by crawling. It creates .dat files and also some log files. These log files are useful if you want to see the errors that occured.

lynx -crawl -traversal -realm -accept_all_cookies -connect_timeout=7 -nostatus http://websiteurl > /dev/null

-accept_all_cookies can be omitted if you want to be asked whether to accept a cookie or not every-time websiteurl needs to be replaced with the address of the website.

You can run the 'spell' command on all the .dat files to check spellings on your website. Moreover, you can automate the whole process of checking errors and spellings by putting these commands in a shell script !

Back to Linux Tips