CS 1320 (Principles of Algorithm Design I):
Saving Documents From the Web

This document describes two ways to save information from the World Wide Web to your local machine -- as you might want to do when your instructor posts to the Web programs or other files you will need in order to do a homework assignment.

Saving from a browser

Most browsers have a "save as" menu option that allows you to save into a file the contents of the page you are currently viewing. I will describe only the two browsers I'm familiar with, Netscape and lynx; Internet Explorer undoubtedly provides similar functionality.

Netscape

First pull down the "File" menu (by clicking on the word "File" just below the title bar); then select the "Save as" item. You will then get a file-selection dialog box that will allow you to specify where to save the contents of the current page.

This approach works well if you are either (1) using your own computer and wanting to save a page's contents to its disk, or (2) sitting in front of one of the CS lab computers and wanting to save a page's contents to a file in your CS account. If you are accessing one of the CS lab computers remotely (via telnet, for example), this approach will not work. If all you have is a telnet session, however, all is not lost; read on.

Lynx

Installed on the CS lab machines is a text-only browser called lynx, which will work even from a telnet session. Here are some tips to get you started.

Once you have on the screen the page you want to save, typing "p" will display up a menu that will allow you to save the page's contents to a file.

For more information about lynx, read its man page (type man lynx).

Saving using the wget command

You can also use the Unix/Linux command wget to save the contents of a Web page to a file. To use the simplest form of this command, type wget followed by the URL of the page(s) whose contents you want to save. For example, to save the contents of this page, type:

     wget http://www.cs.trinity.edu/~bmassing/CS1320_2000spring/tips_savefromweb.html

(You may be able to cut and paste the URL from another window, e.g., the one running your browser.)

Other options are available, as described in the man page for wget (type man wget).