Browsing the Web: lynx

 < Day Day Up > 

Networking Applications

Many of the command-line network applications are simply textual equivalents of graphical network applications with which you're likely to already be familiar. There are command-line applications for browsing the World Wide Web, transferring files over the Internet, reading your email, and most other network functions you're familiar with. Most of these have both advantages and disadvantages with respect to their graphical counterparts.

The mouse has proven to be an efficient tool for tasks involving complex selections, and command-line applications fail in situations that would require fast and furious mousing. On the other hand, if you're using a terminal and at a command-line prompt, it's almost always faster to use a textual tool to do something quick, such as transfer a file via FTP, than it is to start a graphical client. An additional difference is that some command-line applications can function in both an interactive fashion and as a building-block program. This allows many of them to be used in shell scripts or other programs to provide their functionality to a more complex program that needs to use it.


URLs are one of the most ubiquitous formalized ways of specifying the place a program should look for a particular network resource. You're almost certainly familiar with URLs in a practical sense many of them look like this, for example: What you might not be aware of is that this string has meaning beyond simply specifying the name of a machine,, to which software should connect. The http:// part of the expression is also used, and specifies the connection protocol, which should be used for accessing this resource. Other connection protocols can be specified by the use of other prefixes before the machine name, such as ftp://.Technically, the URL actually has three parts: a protocol specifier (http, ftp, gopher, and so on), followed by a host specification, followed by a path, with the syntax <protocol>://<host><absolute path>. It is technically an error for the path to be empty, and as an absolute path, it must begin with a /. This means that URLs that you occasionally see as are actually incorrect, and properly should be specified as As a matter of fact, when you enter a URL that's missing the trailing / character into your web browser, the result is an error from the server browsers have just been written to disguise this fact from the casual computer user. Instead of returning the top of the website directory, as you might have come to expect when using a URL such as, the web server returns an error indicating that your web browser might want to try a syntactically correct URL, and your browser is obliged to try again. This costs extra load on the server, extra data transmitted, and extra time all of which are annoying to someone at some level.

As we've pointed out previously, Unix is a particular and precise environment. Specifying as a URL to a web browser is sloppy and imprecise, and works only in certain cases in which the browser manufacturer has decided to write its software to try to compensate for poor habits on the part of the user.

A considerable amount of Unix software isn't written to support sloppy usage on the part of the user and requires that you enter complete and correct URLs, including the http://, or other prefix, part of the URL to function correctly.

Some recent Unix software is starting to go the route of the large browsers and support the sloppy usage without a specified protocol, but much still does not, and we don't believe this is a positive trend. We've made every effort to provide complete and correct URLs in the text here, and we hope that you'll get used to using them properly it will eventually save you a considerable headache when you meet an application that requires you to be as precise as it is.

     < Day Day Up > 

    Mac OS X Tiger Unleashed
    Mac OS X Tiger Unleashed
    ISBN: 0672327465
    EAN: 2147483647
    Year: 2005
    Pages: 251 © 2008-2017.
    If you may any questions please contact us: