You can also surf the Web using lynx, a text-based Web browser. It’s not as spiffy as links and doesn’t handle many Web pages as gracefully, but it has its place in your toolbox, too. Generally, you can access the wealth of information available on the Web (Figure 12.7), and you can use lynx to easily download and reformat pages.
1. | lynx http://www.yahoo.com/ At the shell prompt, type lynx followed by the name of an .html file or a Web site address. Here, we’re accessing the Yahoo Web site (Figure 12.7). If you only type in lynx, you’ll get the default page for your system, which is likely the lynx home page or the main page for your ISP. |
2. | Surf, surf, surf! See the sidebars Navigating with lynx and Useful lynx Keystrokes in this section for details. |
3. | Press to quit and return to the shell prompt. That’s it! |
Navigating with lynx
|
✓ Tips
If you access a lynx-unfriendly page, like the one shown in Figure 12.8, press the to scroll down a few times. Usually you’ll be able to find the content.
lynx is a great way to get a spiffy plain text file out of an .html document. Try lynx -dump http://example.com/ goodpage.html > newname.txt to start lynx and direct it to send the display to standard output, and then redirect the output to the file called newname.txt. This will give you the text from the page, without HTML code, in a file in your Unix account.
lynx makes it really easy to get a quick view of a local .html document, but it isn’t as flexible as links for Web browsing in general.
Useful lynx Keystrokes
|