readenglishbook.com » History » Zen and the Art of Internet, Brendan P. Kehoe [top 100 novels TXT] 📗

Book online «Zen and the Art of Internet, Brendan P. Kehoe [top 100 novels TXT] 📗». Author Brendan P. Kehoe



1 2 3 4 5 6 7 8 9 10 ... 15
Go to page:
21 512 Nov 21 1988 .forward -rw-rw-r-- 1 7 11 0 Jun 23 1988 .hushlogin drwxrwxr-x 2 0 21 512 Jun 4 1990 Census drwxrwxr-x 2 0 120 512 Jan 8 09:36 ClariNet ... etc etc ... -rw-rw-r-- 1 7 14 42390 May 20 02:24 newthisweek.Z ... etc etc ... -rw-rw-r-- 1 7 14 2018887 May 21 01:01 uumap.tar.Z drwxrwxr-x 2 7 6 1024 May 11 10:58 uunet-info

226 Transfer complete. 5414 bytes received in 1.1 seconds (4.9 Kbytes/s) ftp>

The file newthisweek.Z was specifically included because we'll be using it later. Just for general information, it happens to be a listing of all of the files added to UUNET's archives during the past week.

The directory shown is on a machine running the Unix operating system---the dir command will produce different results on other operating systems (e.g. TOPS, VMS, et al.). Learning to recognize different formats will take some time. After a few weeks of traversing the Internet, it proves easier to see, for example, how large a file is on an operating system you're otherwise not acquainted with.

With many FTP implementations, it's also possible to take the output of dir and put it into a file on the local system with

ftp> dir n* outfilename

the contents of which can then be read outside of the live FTP connection; this is particularly useful for systems with very long directories (like ftp.uu.net). The above example would put the names of every file that begins with an n into the local file outfilename.

cd

At the beginning of an FTP session, the user is in a ``top-level'' directory. Most things are in directories below it (e.g. /pub). To change the current directory, one uses the cd command. To change to the directory pub, for example, one would type

ftp> cd pub

which would elicit the response

250 CWD command successful.

Meaning the Change Working Directory'' command (cd) worked properly. Movingup'' a directory is more system-specific---in Unix use the command cd .., and in VMS, cd [-].

get and put

The actual transfer is performed with the get and put commands. To get a file from the remote computer to the local system, the command takes the form:

ftp> get filename

where filename is the file on the remote system. Again using ftp.uu.net as an example, the file newthisweek.Z can be retrieved with

ftp> get newthisweek.Z 200 PORT command successful. 150 Opening ASCII mode data connection for newthisweek.Z (42390 bytes). 226 Transfer complete. local: newthisweek.Z remote: newthisweek.Z 42553 bytes received in 6.9 seconds (6 Kbytes/s) ftp>

The section below on using binary mode instead of ASCII will describe why this particular choice will result in a corrupt and subsequently unusable file.

If, for some reason, you want to save a file under a different name (e.g. your system can only have 14-character filenames, or can only have one dot in the name), you can specify what the local filename should be by providing get with an additional argument

ftp> get newthisweek.Z uunet-new

which will place the contents of the file newthisweek.Z in uunet-new on the local system.

The transfer works the other way, too. The put command will transfer a file from the local system to the remote system. If the permissions are set up for an FTP session to write to a remote directory, a file can be sent with

ftp> put filename

As with get, put will take a third argument, letting you specify a different name for the file on the remote system.

ASCII vs Binary

In the example above, the file newthisweek.Z was transferred, but supposedly not correctly. The reason is this: in a normal ASCII transfer (the default), certain characters are translated between systems, to help make text files more readable. However, when binary files (those containing non-ASCII characters) are transferred, this translation should not take place. One example is a binary program---a few changed characters can render it completely useless.

To avoid this problem, it's possible to be in one of two modes---ASCII or binary. In binary mode, the file isn't translated in any way. What's on the remote system is precisely what's received. The commands to go between the two modes are:

ftp> ascii 200 Type set to A. (Note the A, which signifies ASCII mode.)

ftp> binary 200 Type set to I. (Set to Image format, for pure binary transfers.)

Note that each command need only be done once to take effect; if the user types binary, all transfers in that session are done in binary mode (that is, unless ascii is typed later).

The transfer of newthisweek.Z will work if done as:

ftp> binary 200 Type set to I. ftp> get newthisweek.Z 200 PORT command successful. 150 Opening BINARY mode data connection for newthisweek.Z (42390 bytes). 226 Transfer complete. local: newthisweek.Z remote: newthisweek.Z 42390 bytes received in 7.2 seconds (5.8 Kbytes/s)

Note: The file size (42390) is different from that done in ASCII mode (42553) bytes; and the number 42390 matches the one in the listing of UUNET's top directory. We can be relatively sure that we've received the file without any problems.

mget and mput

The commands mget and mput allow for multiple file transfers using wildcards to get several files, or a whole set of files at once, rather than having to do it manually one by one. For example, to get all files that begin with the letter f, one would type

ftp> mget f*

Similarly, to put all of the local files that end with .c:

ftp> mput *.c

Rather than reiterate what's been written a hundred times before, consult a local manual for more information on wildcard matching (every DOS manual, for example, has a section on it).

Normally, FTP assumes a user wants to be prompted for every file in a mget or mput operation. You'll often need to get a whole set of files and not have each of them confirmed---you know they're all right. In that case, use the prompt command to turn the queries off.

ftp> prompt Interactive mode off.

Likewise, to turn it back on, the prompt command should simply be issued again.

Joe Granrose's List Monthly, Joe Granrose (odin@pilot.njin.net) posts to Usenet (Usenet News) an extensive list of sites offering anonymous FTP service. It's available in a number of ways:

The Usenet groups comp.misc and comp.sources.wanted

Anonymous FTP from pilot.njin.net [128.6.7.38], in /pub/ftp-list.

Write to odin@pilot.njin.net with a Subject: line of listserv-request and a message body of send help. Please don't bother Joe with your requests---the server will provide you with the list.

The archie Server archie is always in lowercase

A group of people at McGill University in Canada got together and created a query system called archie. It was originally formed to be a quick and easy way to scan the offerings of the many anonymous FTP sites that are maintained around the world. As time progressed, archie grew to include other valuable services as well.

The archie service is accessible through an interactive telnet session, email queries, and command-line and X-window clients. The email responses can be used along with FTPmail servers for those not on the Internet. (FTP-by-Mail Servers, for info on using FTPmail servers.)

Using archie Today

Currently, archie tracks the contents of over 800 anonymous FTP archive sites containing over a million files stored across the Internet. Collectively, these files represent well over 50 gigabytes of information, with new entries being added daily.

The archie server automatically updates the listing information from each site about once a month. This avoids constantly updating the databases, which could waste network resources, yet ensures that the information on each site's holdings is reasonably up to date.

To access archie interactively, telnet to one of the existing servers. {See Telnet, for notes on using the telnet program.} They include

archie.ans.net (New York, USA) archie.rutgers.edu (New Jersey, USA) archie.sura.net (Maryland, USA) archie.unl.edu (Nebraska, USA) archie.mcgill.ca (the first Archie server, in Canada) archie.funet.fi (Finland) archie.au (Australia) archie.doc.ic.ac.uk (Great Britain)

At the login: prompt of one of the servers, enter archie to log in. A greeting will be displayed, detailing information about ongoing work in the archie project; the user will be left at a archie> prompt, at which he may enter commands. Using help will yield instructions on using the prog command to make queries, set to control various aspects of the server's operation, et al. Type quit at the prompt to leave archie. Typing the query prog vine.tar.Z will yield a list of the systems that offer the source to the X-windows program vine; a piece of the information returned looks like:

Host ftp.uu.net (137.39.1.9) Last updated 10:30 7 Jan 1992

Location: /packages/X/contrib FILE rw-r--r-- 15548 Oct 8 20:29 vine.tar.Z

Host nic.funet.fi (128.214.6.100) Last updated 05:07 4 Jan 1992

Location: /pub/X11/contrib FILE rw-rw-r-- 15548 Nov 8 03:25 vine.tar.Z

archie Clients

There are two main-stream archie clients, one called (naturally enough) archie, the other xarchie (for X-Windows). They query the archie databases and yield a list of systems that have the requested file(s) available for anonymous FTP, without requiring an interactive session to the server. For example, to find the same information you tried with the server command prog, you could type

% archie vine.tar.Z Host athene.uni-paderborn.de Location: /local/X11/more_contrib FILE -rw-r--r-- 18854 Nov 15 1990 vine.tar.Z

Host emx.utexas.edu Location: /pub/mnt/source/games FILE -rw-r--r-- 12019 May 7 1988 vine.tar.Z

Host export.lcs.mit.edu Location: /contrib FILE -rw-r--r-- 15548 Oct 9 00:29 vine.tar.Z

Note that your system administrator may not have installed the archie clients yet; the source is available on each of the archie servers, in the directory archie/clients.

Using the X-windows client is much more intuitive---if it's installed, just read its man page and give it a whirl. It's essential for the networked desktop.

Mailing archie

Users limited to email connectivity to the Internet should send a message to the address archie@archie.mcgill.ca with the single word help in the body of the message. An email message will be returned explaining how to use the email archie server, along with the details of using FTPmail. Most of the commands offered by the telnet interface can be used with the mail server.

The whatis database

In addition to offering access to anonymous FTP listings, archie also permits access to the whatis description database. It includes the names and brief synopses for over 3,500 public domain software packages, datasets and informational documents located on the Internet.

Additional whatis databases are scheduled to be added in the future. Planned offerings include listings

1 2 3 4 5 6 7 8 9 10 ... 15
Go to page:

Free e-book «Zen and the Art of Internet, Brendan P. Kehoe [top 100 novels TXT] 📗» - read online now

Comments (0)

There are no comments yet. You can be the first!
Add a comment