Previous Next Table of Contents

3. TCP/IP apps

3.1 telnet

Telnet attaches your tty to a remote host, where you get the login prompt.

It isn't a VDU emulator, you want the same TERM on the remote host as is infront of you. Any screen control ESC codes get passed though, between the remote application, and your VDU (vt100 or linux console).

Telnet is a line driver, and switches between LINE buffered mode for remote shells (and dumb equipment), and LINE RAW mode where each key-press is sent down the line.

Telnet adds a CRTL-] key, to interrupt and then quit the connection.

telnet host port

Telnet can also connect to any remote port, (even if it doesn't make sense to do so). This enables you to manually drive a network connection that is ususally automated.

For example as a substitute for sendmail, you can connect to a remote smtp server using:

        telnet remotehostname smtp

3.2 ftp src.doc.ic.ac.uk

ftp is how you connect to a remote machine as a specific user, and fetch/send files. Most servers allow you to connect as the user 'anonymous' with the password: user@host.domain. Many will automatically lookup user@.

A common feature of anonymous ftp, is that access is limited to files within /home/ftp. Your system is probably already an anonymous server, you can see what you look like with ftp localhost (not much fun, is there aren't any interesting files in /home/ftp).

Once you have done an ftp connect/login, you have a command line interface where you can type simple commands. The actual transfers use a second connection.

cd /packages/linux

This changes directory on the remote machine.

ls -rt

This lists the files in reverse time order. You can also specify a wild-card which makes slow connections usable.

binary

This tells ftp to request binary mode transfers for all files. Most servers do this anyway, but if you forget, the .tgz file will contain errors.

hash

This command is VITAL. It tells ftp to print a '#' for every 1K it transfers. It tells you that ftp and TCP/IP are alive and making progress,

get README.something

This fetches the remote file to the current directory with the same name. The file's date will be set to today (mc corrects for this if it can).

mget pkg*26*

This is a multi-get (even if only one file matches!), every matching filename will be offered, and you reply 'y'.

The wildcard you use may pick up files you don't want (such as pkg-0.7.26-a.out.tgz), so you say 'n'.

ftp runs at about 0.5 to 5 Kps over V34 modem. Binaries usually transfer at line speed, ie 2.5 Kps. A 4 megabyte file takes half an hour -if- everything runs quickly. Throughput depends on every component in the chain.

3.3 mc ftp://src.doc.ic.ac.uk/packages/linux/sunsite.unc-mirror.

Mosaic, netscape and others make excellent ftp browsers. mc version 3 has ftp browsing added (with a similar syntax). If you setup $HOME/.netrc it will know to login as anonymous. It also keeps fetched files (eg after pressing the F3 key) so that F5-COPY is quick. It has a few bugs, but I guess the authors know that.

Has anyone used W3_get ? If you have a list of FTP clients, that do/don't make sense to you, please write your opinions about them, and put them in your home www pages, or send them to your local user groups forum pages. If you like Raven, send me the URL, and description paragraph, I'll add it somewhere.


Previous Next Table of Contents