A Bit of Unix

for CTC Mail and Gopher Users

by Larry Susanka

Unixland is a shorthand and trick infested command line swamp from which any right thinking person steers clear as much as possible. Programmers like it because it is very powerful and they have memorized all the basic commands and tricks. It is like a club code language. Club members are forbidden from speaking intelligibly about this language to outsiders. I, on the other hand, cannot speak intelligibly about Unix because I don't know Unix.

This handicap notwithstanding, I have attempted to outline a few things that I have discovered to be useful.

It is by no means necessary to learn Unix to be a net surfer, but if you learn a few commands you will have an easier time managing a shell account and also when wandering further afield on the Internet. The Internet is mostly in Unixland.

What you will find below is a short list of commands that work on machines running most Unix dialects and even some of the competing operating systems.

Along with the list is a keystroke-by-keystroke guide that you can follow on your shell account to see how they work in practice. I have illustrated these commands on my shell account at CTC and this guide is aimed primarily at CTC users. However any shell account should work the same way with minor variations.

The commands and symbols you will, sooner or later, want to know are :

ls cd du rm mkdir rmdir
* ? w man > |
page cat exit ps kill mv
/ cp chmod compress uncompress tar

There are also programs that are used to talk to other computers or access common internet services that run on the Unix operating system. These have their own commands and syntax that generally follow the Unix pattern. Unix programs are fired up by typing their name on the command line. The ones I will discuss or mention are:

finger sz rz kermit pine rn
telnet ftp gopher lynx tin

In the following descriptions of "how to tell the CTC machine running Unix to do various things" all commands will follow a $ prompt. On other machines you might see % or something else as "prompt." You do not type the prompt - when the machine is ready to listen to you it will send this to you and it will appear as the first character on the "command line." You type a command after it and then hit the return key.

When I describe in the text something you are to type on the command line I will surround the key strokes with quotes. Don't type the quotes. Other times I will demonstrate a command by showing you actual output that I copied from my screen while I was online. You should type commands exactly as they appear there, spaces included.

I will also use the character ^ from time to time. This always stands for the "control" or "ctrl" key.

Attention Mac Users:
Commands and file/directory names in Unix can NEVER contain spaces. Spaces occur on a command line to separate parts of a command or separate different files.

1. ls, cd and du

After you have logged on you will find yourself looking at the dollar sign $ in your home directory. You can store files (text or programs or pictures etc.) there. For reasons of tidiness you might want to create your own subdirectories and store things in them.

There is a "list" command that instructs Unix to give you a simple list of all the files and subdirectories that are in the "current" directory (i.e. the one you are in) and which don't start with a period. Files that start with a period are usually files that have to do with the maintenance of your account or are otherwise used by programs you run on the CTC computer, such as Pine or Gopher or Finger.

To find out what is in your home directory type :

$ ls

In my home directory I found:
00ad-abstracts.txt  News                mail
Mail                download            netscape.sea.hqx

This consists of two text files and four subdirectories, although there is no way to tell that from this simple listing. To get more detail, and to see those period files try :
$ ls -als

This shows an expanded list that in my case was
total 1768
   6 drwx------   7 lsusanka mailgrp     3072 Dec 27 21:44 .
   6 drwxr-xr-x  124 root     sys         3072 Dec 13 13:12 ..
   6 -rw-------   1 lsusanka mailgrp     2132 Dec 27 17:04 .addressbook
   6 -rw-------   1 lsusanka mailgrp    2620 Dec 27 17:04 .addressbook.lu
   2 -rw-------   1 lsusanka mailgrp      818 Sep 20  1993 .cshrc
   2 -rw-------   1 lsusanka mailgrp      347 Sep 20  1993 .exrc
   0 -rw-------   1 lsusanka mailgrp        0 Dec 26  1993 .gopherrc
   2 -rw-------   1 lsusanka mailgrp      377 Sep 20  1993 .login
 126 -rw-------   1 lsusanka mailgrp    64443 Oct 17 21:20 .newsrc.Z
 126 -rw-------   1 lsusanka mailgrp    64387 Oct 17 21:19 .oldnewsrc.Z
  10 -rw-r-----   1 lsusanka mailgrp     4701 Dec 27 21:45 .pine-debug1
  10 -rw-r-----   1 lsusanka mailgrp     4454 Dec 27 21:35 .pine-debug2
  12 -rw-------   1 lsusanka mailgrp     6049 Dec 27 17:09 .pine-debug3
  14 -rw-------   1 lsusanka mailgrp     6603 Dec 27 17:03 .pine-debug4
  16 -rw-r-----   1 lsusanka mailgrp     8058 Dec 27 21:44 .pinerc
   2 -rw-r--r--   1 lsusanka mailgrp       54 Jan 14  1994 .plan
   2 -rw-------   1 lsusanka mailgrp      382 Sep 20  1993 .profile
   8 -rw-------   1 lsusanka mailgrp     3632 Dec 27 22:57 .sh_history
   2 drwx------   4 lsusanka mailgrp     1024 Oct 17 21:19 .tin
 154 -rw-r-----   1 lsusanka mailgrp    78294 Dec 27 18:24 00ad-abstracts.txt
   2 drwx------   2 lsusanka mail          24 May  3  1994 Mail
   2 drwx------   2 lsusanka mailgrp     1024 Oct 13 19:42 News
   2 drwx------   2 lsusanka mailgrp       24 Aug  2 00:06 download
   2 drwx------   2 lsusanka mailgrp     1024 Dec 27 17:09 mail
1248 -rwxrwxrwx   1 lsusanka mailgrp   624407 Dec 22 19:20 netscape.sea.hqx

This shows first the total number of memory blocks I am currently taking up on a CTC hard drive (1786 - each block is 512 bytes.)

Then on each consecutive line that follows it shows a file or subdirectory (the name is on the far right) and various pieces of information about it. First is the size of the file in blocks. Then is the "permissions" stuff - who gets to read or change your files. You can change these permissions with "chmod." Then comes the file owner (in this case me, lsusanka) surrounded by a number on the left and an abbreviation such as mailgrp on the right. I don't know what the number or abbreviation mean. Then comes the exact file size in bytes. Then is listed the file's date of creation.

I can't tell for sure from looking at the listing above which are directories and which are files. I have found that if the size is 512, 1024, or 2048 it is always a directory, and if the size is much larger it is never a directory.
To go up or down in the directory tree, that is to "change directory," use "cd."
$ cd  ..
takes you up one level.
$ cd 
(nothing after "cd") takes you back to your home directory from anywhere
$ cd name 
takes you into the subdirectory "name" of the current directory.

This is what I got after typing the following commands:
$ cd ..

$ ls
aalborno cgriffit dtownsen jlavegli laleeds  mvanbode rjeffers sralston
acorway  chall    dwest    jperry   lepstein mwilliam rkeeton  ssimmons
acorwin  clyle    eerickso jphelps  lkahn    nevans   rmcglass tcenterw
adaar    cmccarty flee     jrelf    lleeds   pandrus  rnixon   tclark
agoss    crobinso fruetz   jrostiro lmacneil pmelvoin rrichard tculler
ajackson csanders fwalls   jshuman  lreibman pneff    rworthin tdemyan
akhan    csulliva glarsen  jsoto    lschiebe poconnor scarlson tweston
amiller  ctucker  gleighto jsurendr lsusanka pratener scarpent vmasclet
asuter   cvonpapp gmahn    jwesle   lteide   pwalter  sedson   wvolland
ayabui   cwilliam gmcglock kbradley lwitter  rdavis   shampson young
bdecoste dbrown   hbaskas  khoppe   mdunne   rgeorge  sharper
bfloten  deiben   hsewall  khutchis mgelotte rgilliam sjaswal
bpetruli dfigge   jcarrasq ksteiner mkorolen rhamilto skline
cburton  dhoffman jforest  kweir    mmclean  rhewitt  sknauss
ccarter  dmocanu  jgould   kwhite   mtalbott rhobbs   smarks
cchigi   dnoble   jkotker  kwittern mthorp   rjackson sorcutt

$ cd rrichard

$ ls


$ cd

$ ls

00ad-abstracts.txt  News                mail
Mail                download            netscape.sea.hqx

In the sequence above I first went up one level to the directory that contains the home directories of everyone at BCC. I listed these directories. Note that lsusanka (me) is on the list. So is rrichard. I went down into rrichard's home directory and listed the contents. The only thing there was mail which is a directory we each have that is used by the Pine program. Then I went home and listed again.

You should login and play with "cd" (change directory) and "ls" (list) a bit until you get a feel for the "hierarchical" directory structure. You might, for example, check out the directories higher up on the directory tree. Don't worry about hurting files or causing problems - these commands can't hurt anything and if you try to go somewhere private you will simply find permission to enter denied. Recently they have tightened up security at CTC so you may get this response if you try to descend into most personal directories other than your own.

If you want to know about your disk usage - how many blocks (each of size 512 bytes) you are using (listed by directory) type:

$ du 

2. rm, mkdir, rmdir, * and ?

The commands "rm", "mkdir" and "rmdir" are designed to remove a file, make a new directory and remove a directory. Their usage is simplicity itself.

Suppose you have three files, with names house, House and hhhouse, taking up space in the current directory and you want to wipe 'em out. Type:
$ rm house House hhhouse

and they will be gone. I know of no way to recover such a file if you change your mind. You could also have typed :
$ rm *se

and they would have been wiped out too. "*" stands for "any list of characters." Any file that ends in "se" will be removed, so use this carefully. If you had simply wanted to remove house and House you could have used :
$ rm ?ouse 

"?" stands for any single character and so hhhouse will be spared. Many Unix commands and programs use these "wild card" characters, and they can save you a lot of typing if used carefully.

The following line will create a new directory (subdirectory of the current directory) called pictures and the line after that will wipe it out.
$ mkdir pictures

$ rmdir pictures

3. w and finger

These two commands are for general snooping, always an exciting activity.

If you want to see who is logged on at CTC and what they are doing type :

$ w

If you want to find out more about someone and you know their e-mail address you can use the Finger program. For example to find out more about me type:

$ finger lsusanka@ctc.ctc.edu

This will read various files that start with a period in my home directory (such as my .plan file) and give you a report. If you want to learn about someone outside of CTC you must include the complete e-mail address after "finger." Finger is regarded by many system administrators (for whom "paranoid" is a healthy state) as a security risk. Many domains do not allow finger access.

Finger is also used sometimes to provide information about Internet services or other text information. You must know the address to "finger" to get it.

4. man, >, page, cat, |

Most of the commands and programs have numerous options that I will not discuss here. Someday you might want to explore some more. If you are actually running and interacting with a program such as telnet or ftp or gopher and need some help try typing "help" or "?." For most of these programs one or the other will elicit a list of commands the program will recognize. You may be able to guess what they do. But if you want to find out what these commands mean you need a manual. If you type

$ man finger

you will find all about the finger program. A screen of information will scroll up and stop. When you want some more hit "space" and you will get another screen-full.

You can save this as a text file. The ">" command takes the output of man, or any other Unix command that generates output, and places it in a file whose name you can specify. For example:
$ man finger > ManualFinger

will cause man to look up the manual for finger and place it in a text file named "ManualFinger" which will appear in the current directory. You might want to do this if you intended to bring this information back to your home computer as a text file for later perusal offline.

There are a couple of ways of viewing a text file residing in the current directory that I have found useful.
$ page ManualFinger 

will let you read the text file one page at a time (hit "space" for each new page.)

$ cat ManualFinger

will read through the whole file without stopping. If it is longer than one page the text will simply scroll up off the top of the visible window of your terminal emulation program and disappear. Most terminal emulators have a scroll buffer and you can scroll back up and read it at leisure. You might, for example, want to cut parts and paste them into a Word or WordPerfect document.

You could also read through the manual entry for finger without saving it first to a file by "pipelining" the output of "man finger" directly to page or cat using the vertical bar symbol "|." The "pipeline" symbol takes the result of any Unix command typed to its left and sends it the Unix command that is typed to its right. Check out the following two lines to see what this means in action.
$ man finger  |

$ man finger  |

The other use for cat is to "concatenate" files. For example:
$ cat f1 f2 f3  >  final

will take the three files f1, f2 and f3 and place their contents in order in a single new file named final.

5. exit, l, logout, q, quit, ^\, ^],

ps and kill (ps -u userid and kill -KILL #)

You already know, I hope, that when you want to leave CTC for the day you must type "exit" to properly shut down. If you just hang up you might leave your account management process running. This is anti-social because the process will be eating up a bit of computer time and if many people do this it can hurt the performance of the computer. Your account might remain active until a system administrator comes along hours later and notices that there has been no activity on the process for a long time and manually shuts you down. There is also another reason you should properly exit. I have at least half a dozen times called up CTC, had my modem connect and, without logging on, found myself in the open account of someone else. I could have changed that person's files or sent unauthorized messages in that person's name. If this happens to you type "exit" and try again.

Even if you try to be scrupulous about "exiting" problems can still occur. You will, if you have not done so already, find yourself in a situation where you don't know what to do and you can't get out of the program that is running. Common "kill this program" key combinations are exit, l, logout, q, quit, ^\, and ^] . Try them. At a certain point you give up and disconnect your modem. You may have left a process running. What can you do about it?

First, login again and type "w" at the prompt. This will list everybody who is logged on and what they are doing. If you are listed only once you are OK. Otherwise you have a problem.

You have to kill any extra processes - but how? Each running process has a "process ID number" or PID and you can kill any process that belongs to you if you know this number. So killing an extra process takes two steps - get the number and then kill it.
$ ps -u   YourLogonNameHere

You will get a listing of all running processes that you own. There should be one process called ksh and one called ps. If there are two called ksh one of them must die. Usually it is the one with the smaller PID which I will denote # . Type :
$ kill -KILL # 

This will kill process #. If you guessed the wrong PID, CTC will hang up instantly. Call back and try the other one.

6. mv, / , cp and chmod

These commands are for moving files around to different directories, copying them into a new file with a different name and changing the "permissions" associated with a file - that is, who gets to read or change a file. The command
$ mv A ..

will move file A "up" one directory, into the directory that contains the current directory.
$ mv A S

will move file A to directory S, where S is a subdirectory of the current directory. It is also possible to specify longer paths to the destination directory. The symbol / is used for this.

$ mv A ../S/T

will take the file A, move it up one level, then down through S to the final directory T.
$ cp A B

will create a copy named B of the file A.

If you want to change the "permissions" associated with a file you can do that with chmod. I refer you to the manual entry for complete details. I will however spell out the commands that will make the two most common changes.
$ chmod a+r  A

will let anyone come into your directory and read and copy the file named A.
$ chmod a-rwx  A

will restrict all permissions (Read, Write and eXecute) to everyone except you and CTC system administrators.

7. compress, uncompress and tar

These commands are definitely not vital for your first few months, but you may well find them handy in the first year.

If you are running up against the CTC directory storage limit and want to keep some files around for a while you can compress them. The compressed result will be a lot smaller than before if it was a text file. A suffix .Z will be attached to the file to indicate it has been compressed and the old file will be removed. The command "uncompress" reverses this.
$ compress A

$ uncompress A.Z

I have on a number of occasions found myself with a bunch of documents and programs that I wanted to send to someone. Sooner or later you will too. You can, if you wish, attach them to the outside of an e-mail message, one at a time, as described in the Pine section below. A better way is to gather them all together into a single file and send that.

In the sequence below, the files f1, f2 and f3 are copied into a single "tar archive" which I decide to name arch.tar. It is a good idea to give tar archives the suffix "tar" so you and others will know what they are. f1, f2 and f3 remain in the current directory unchanged. f1, f2 or f3 could be directories and everything in them would be included too.

I then compress arch.tar, creating arch.tar.Z which replaces the (usually) much larger arch.tar.
$ tar cf arch.tar  f1 f2 f3

$ compress arch.tar

Someone receiving the compressed archive arch.tar.Z would see the suffixes and know how to reverse this. The first thing to do is to uncompress the tar archive. The file arch.tar.Z will be replaced by arch.tar. The next step is to extract the files from the archive. The files (or directories) f1, f2 and f3 will appear in the current directory. The file arch.tar will not be removed.
$ uncompress arch.tar.Z

$ tar xf arch.tar

8. ZMODEM and Kermit

These two programs are the most popular methods of sending files back and forth between a host computer like CTC and your home or office computer. This process is called uploading (home to CTC) and downloading (CTC to home.) Of all the various protocols ZMODEM is the fastest and easiest to use.

Suppose you have files f1, f2 and f3 in your current directory at CTC and you want them on your hard drive at home.

Your terminal emulation software supports various protocols to do this. You have to read the manual for your terminal software and see which downloading protocols it supports and configure the terminal software if necessary as recommended there. Usually it is easy. If your terminal emulator does not support ZMODEM transfers I advise you to go get one that does. You should not have to pay very much. In fact if you could do downloads you could go get one for free on the Internet...but...oh well.

To download these three files using the ZMODEM protocol tell CTC to "send ZMODEM" by typing either :

$ sz f*

$ sz f1 f2 f3

Your terminal emulator might need to be told to wake up and pay attention at this point, but it should be listening all the time for the characters that will tell it that CTC wants to download with this protocol. You may be asked where you would like the files to be placed. You then do nothing but wait till the download is through. Note that ZMODEM accepts the "wild card" characters and will automatically manage multiple file transfers. It will also detect any errors in transmission, resend erroneous parts automatically and if a transfer is interrupted it will resume where it left off when you send again. It should indicate when it is through.

To upload files tell CTC to "receive ZMODEM" by typing:
$ rz

CTC will then tell you to go home and select files to send. Your terminal emulator will have some way of doing this.

ZMODEM does a lot for you - and fast too - and so passes a lot of information back and forth during the transfer expecting certain replies on time. Because of this if you are connected to CTC over multiple links, as we are at BCC when we call the library modems to transfer us to CTC, ZMODEM might not work. Try Kermit.

To download text files type
$ kermit -s filename

and you will be prompted to go home and tell your terminal emulator to expect a Kermit download.

To upload type
$ kermit -r

CTC will prompt you to go home and select Kermit transfer and the desired file.

If the file is binary (i.e. a program or a Word or WordPerfect file NOT saved as "Text Only") substitute
$ kermit -i -s filename

$ kermit -i -r

for the commands listed above.
See the manual entries for more of the (many) options.

9. Pine

If you are reading this you probably already know the basics of the mail program Pine. I am going to concentrate on several things that might take people a while to find out about but which are very useful.

a) If you are reading an e-mail message or it is highlighted in the inbox and you want to send it out to your home directory type "e" for "export." You
will be prompted for the name of the text file to be created.

b) If you want to take a pure text file in your home directory and paste it into an e-mail message you are composing, place the cursor at the point where you want to insert the file and hit the keys "^R." You will be asked for the name of the file. It will then be inserted.

This must be a document that is a text file. It CANNOT be a regular Word or WordPerfect document, which have zillions of invisible control characters mixed in with the text. Tell your word processing program to "Save As Text Only." before uploading. This is an option on most of these programs.

c) If you want to send a Word or WordPerfect document or a program or picture or something you can send it by "attaching" it to the outside of an e-mail message. The file must be in your home directory. Place the name of the file to be attached in the "attachment" line in the e-mail message header. Hit "return" and it will be attached. For further attachments, place the cursor in the message header and hit "^J."

d) If you want access to an attachment someone has sent you first open the letter. Hit "V" to "View Attachment." You will be presented with a menu of attachments to "View." Highlight the one you want and save it to your home directory by typing "S." You will be given the option to change its name before it is written to your home directory.

10. Telnet (telnet , ^] , z , fg , exit)

The telnet program lets you make a connection between a computer to which you are already logged on (the "local host") and another computer (the "remote host") and it will seem to you as if you had called that second computer directly. You might want to do this if you were visiting a distant place and wanted to check your mail from a friend's local account, thereby avoiding long distance charges. After you have been at this game for a while you might want to login to kindly computers that allow "guest" or "archie" login. There are lots of computers out there to which you might wish to connect...

In any case, telnet is easy to use. Below is a copy of what showed up on my screen during a (rather atypical but illustrative) telnet session.

a) I started out logged in to the CTC computer. I typed "ls" to see what I had in my home directory at CTC and found a few files.

b) Then I decided to telnet to my commercial account at cyberspace.com. I typed "telnet cyberspace.com" after the $ prompt. The connection was made and I was given my usual login prompt just as if I had called CyberSpace directly over a modem from home.

c) I logged in with name and password (you can't see the password) and identified my terminal type and there I was! The Cyberspace equivalent to the CTC dollar sign is "cyberspace/home/lsusanka>." I then typed "ls" just to show you that we were in a different directory.

e) I then decided I just had to go back briefly to see if my files were OK at CTC (or check my mail or something.) I typed "^]" to enter the telnet command environment and "z" to suspend the telnet session. I was then back at CTC and typed "ls" to show you we were back in my CTC home directory.

f) I wanted to go back to CyberSpace so I typed "fg" to resume the telnet session. fg is a general Unix command to bring a process you have placed
in the "background" into the "foreground." I then typed "ls" to prove to you that I was back at Cyberspace.

g) This had gotten to be a drag so I decided to end it all and terminate the telnet session by typing "exit" and was permanently back at CTC.

$ ls
News              ftp               netscape.sea.hqx
Mail              download          mail              telnet

$ telnet cyberspace.com


Connected to cyberspace.com.

Escape character is '^]'.

Cyberlink Communications (case.cyberspace.com)

Login as new with no password to start an account.

login: lsusanka

(You can't see the password when you type it.)

Last login: Fri Jan  6 17:14:23 from ctc.ctc.edu

Welcome to Cyberspace.COM!

You have mail.

cyberspace/home/lsusanka> ls

Mail/  News/  mail/

(I typed "^]" on this line after the > prompt. It is invisible.)

telnet> z

[1] + Stopped                  telnet cyberspace.com

$ ls

News              ftp               netscape.sea.hqx

Mail              download          mail              telnet

$ fg

telnet cyberspace.com>


You are now leaving CyberSpace ...

Connection closed by foreign host.


11. FTP (ftp, open, close, cd, ls, !, mget, mput, quit)

FTP, or file transfer protocol, is the method of choice for moving files around between Internet domains (such as ctc.ctc.edu or u.washington.edu.) There are innumerable public archive sites containing a mind-boggling variety of interesting - free - things such as NASA photos, freeware or shareware applications, upgrades to commercial software, electronic magazines, weather maps etc. etc. - several terabytes of data - much of it available by "anonymous" ftp. You would use ftp to move these wonderful things from the remote host (the archive site) to the local host (CTC.) You would then use ZMODEM or Kermit or something to bring it on home to your personal computer. You probably won't conceive of a need for ftp until you've played around on the Internet a bit, read some newsgroups or the output of some listserv lists where they discuss these things. Eventually you will learn the domain name of a killer site that contains just your cup of tea and you will want to go and GET SOME STUFF. Here's how.

First you need to know where the STUFF is located. At the least you need to know the domain name of the ftp server that manages the transfers on the remote host. I know that two files I want are located at domain ftp.cyberspace.com. Even more, I know where they are located within the directory structure of this archive site. If I didn't have this information I would have to wander around in the directory tree of ftp.cyberspace.com looking for these files using "cd" and "ls." Large archives may contain tens of thousands of files, so when someone tells you about a cool file they should also tell you where it is.

My files are in pub/ppp/mac/macppp. Public archive sites usually have a directory pub within which they place the files they wish to make available to anyone. The backslashes mean that ppp is a subdirectory of pub, mac is a subdirectory of ppp and macppp is a subdirectory of mac.

Below is a copy of my ftp session with ftp.cyberspace.com.

a) I typed "ftp" to fire up the program but I incorrectly typed the name of the archive site (note the space rather than period before cyberspace.) ftp didn't understand me and reported a problem and presented me with a prompt "ftp>." It is asking "what now?"

b) I typed "open" and the correct address. The ftp server at ftp.cyberspace.com responded by asking me for my name and password. Since I have an account with these people, I could have given my real name and password, but usually you will not and will type "anonymous" as your name and your complete e-mail address as password.

c) ftp.cyberspace.com sends some information and tells you it is using binary mode for transfers and presents you with the ftp prompt "ftp>." It is possible that some site might use ascii mode for file transfers and you will want to switch to binary. You type "bin" at the ftp prompt as I have done here to make the switch. If later you want ascii (text) transfer, type "ascii" at the prompt.

d) I then typed "ls" to list the files and directories in the current directory (the one the remote ftp server dumped me in at first.) Note the listing is the type that you would see if you typed "ls -als" at the CTC prompt. Some ftp servers will give you this complete listing with "ls" and some will not, and you would have to type "ls -als" to get it. Note that pub is on the list.

e) I then typed "cd pub/ppp/mac/macppp" after the ftp> prompt to move four directories deeper in the directory structure. I then typed "ls" to see if the files I wanted were there. They were, the first two files on the list.

f) I typed "mget *cPPP*" using the wild card character * to avoid having to type the complete filenames. Had I typed "*PPP*" I would have been requesting the first four files. ftp.cyberspace.com responds by asking me if I want each file in turn ( "return" for yes, "n" for no) and giving me some information about the transfer.

g) I want to check to see if everything made it OK so I type "! ls." The exclamation point is a command that instructs ftp to execute the command that follows at the local host (CTC) and report the result. In this case I wanted a list of files at home, but I might also have wanted, for example, to type "! du" to see if I was approaching the storage limit of my account.

h) The files I wanted made it so I typed "quit" to kill ftp and was back at CTC for good.
$ ftp ftp cyberspace.com

ftp: bad port number-- cyberspace.com

usage: ftp host-name [port]

ftp> open ftp.cyberspace.com

Connected to case.cyberspace.com.

220 case FTP server (Version wu-2.4(1) Tue Dec 20 16:06:58 PST 1994) ready.

Name (ftp.cyberspace.com:lsusanka): anonymous

331 Guest login ok, send your complete e-mail address as password.

(Type your complete e-mail address here - not so anonymous, is it?)

230-Welcome to the Cyberspace FTP Server!
230-*** Please note ***
230-Individuals using this computer system without authority, or in excess
230-of their authority, are subject to having all of their activities on this
230-system monitored. Anyone using this system expressly consents to such
230-monitoring and is advised that if such monitoring reveals possible
230-evidence of criminal activity, system personnel may provide any gathered
230-to law enforcement officials.
230-Any questions about this server and its use can be sent to the
230-administrator:  ftp@cyberspace.com
230-All activity on this server is being logged.  If this bothers you,
230-you can turn off logging by typing 'quit' :)
230-Please read the file README
230-  it was last modified on Fri Dec  9 16:46:01 1994 - 29 days ago
230 Guest login ok, access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.

ftp> bin
200 Type set to I.

ftp> ls

200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.

total 73
-rw-r--r--  1 root     staff        1827 Sep  1 23:35 .cshrc
-rw-r--r--  1 root     staff          21 Nov 28 04:04 .forward
-rw-r--r--  1 root     staff        1190 Sep  1 21:40 .login
-rw-r--r--  1 root     staff         708 Dec 10 00:46 README
d--x--x--x  3 root     staff         512 Dec 21 00:10 bin
drwx--x--x  2 root     staff         512 Dec 24 22:41 dev
d--x--x--x  2 root     staff         512 Dec 21 00:16 etc
drwxr-xr-x  2 root     staff        8192 Dec 24 22:35 lost+found
-rw-r--r--  1 root     daemon      53362 Jan  7 08:14 ls-lR.Z
drwxr-xr-x 11 root     staff         512 Jan  2 23:52 pub
d--x--x--x  3 root     staff         512 Sep  1 21:06 usr
-rw-r--r--  1 root     staff         661 Dec 10 12:41 welcome.msg
226 Transfer complete.

ftp> cd pub/ppp/mac/macppp

250 CWD command successful.

ftp> ls

200 PORT command successful.

150 Opening ASCII mode data connection for /bin/ls.
total 370
-rw-r--r-- 1 valko local 176120 Sep 20 19:38 MacPPP2.0.1.sea.hqx
-rw-r--r-- 1 valko local  54568 Oct 31 00:26 MacPPP_stuff.sit.hqx
-rw-r--r-- 1 valko local  80493 Nov 22 07:52 PPP_TCP_HowTo.rtf.sit.hqx
-rw-r--r-- 1 valko local  45603 Nov 22 07:54 PPP_TCP_HowTo.word.sit.hqx
-rw-r--r-- 1 valko local   7389 Aug  2 11:03 mac-ppp-add-ons.hqx
226 Transfer complete.

ftp> mget *cPPP*

mget MacPPP2.0.1.sea.hqx?
(Hit "carriage return" here for "yes", n for "no.")

200 PORT command successful.
150 Opening BINARY mode data connection for MacPPP2.0.1.sea.hqx (176120 bytes).
226 Transfer complete.
176120 bytes received in 9.19 seconds (18.72 Kbytes/s)

mget MacPPP_stuff.sit.hqx?

200 PORT command successful.
150 Opening BINARY mode data connection for MacPPP_stuff.sit.hqx (54568 bytes).
226 Transfer complete.
54568 bytes received in 3.35 seconds (15.90 Kbytes/s)

ftp> ! ls

MacPPP2.0.1.sea.hqx   News                  netscape.sea.hqx
MacPPP_stuff.sit.hqx  download
Mail                  mail

ftp> quit

221 Goodbye.


There is another command you might want to use someday. It is "mput." It works like "mget" but in the other direction. It will take a file in the current directory of the local host and place it in the current directory of the remote host. You must have write permission for this directory on the remote host. There is often a directory called "incoming" at archive sites that accepts contributions from the public.

12. The Listservs

There are many many thousands of interest groups with a presence on the internet. Most of these communities keep in touch with their enthusiasts using a Listserv List, a USENET news group or both.

Listservs are less formal and more local, relying on a willing system administrator to provide access to the mailer software.

Some lists are "moderated" - that is the contributions might be edited, truncated or excised completely - and some are not.

Unmoderated listservs are much less headache to run. The manager of each of these groups maintains a simple list of e-mail addresses. There is a robot at the list site, called a listserv server, that forwards any message sent in to all the members of the list within seconds. This provides an interactive forum for people to argue with and inform each other about the topic in a certain type of public setting - a new type of setting. Some people remain "lurkers," the Internet version of voyeurs, while others become total jerks and "flame" anyone they disagree with. Most, of course, contribute when they can, ask questions when they need help and only rarely participate in "flame wars."

Moderated lists stick to topic better and the moderator keeps flame wars from escalating out of control but lose immediacy.

Almost everyone who is active on the Internet is a member of several listserv lists. Some lists can generate a hundred messages a day. At first you may pick too many and be overwhelmed. You can then ask for the digest version of the list output and at intervals a single (long) compendium will arrive at your mailbox.

You subscribe to a listserv list by sending an e-mail message to a listserv server with the words

subscribe listname

in the body of the message. The robot reads your e-mail address from the letter and you are on the list.

If you want a long list of many (but by no means all) of the current listserv lists with short descriptions of topic, send me an e-mail message (lsusanka@ctc.ctc.edu) requesting this information and I will forward it to you, along with a reminder of how to subscribe, as an attachment to an e-mail message. This will be a BIG file and you should earmark an afternoon to go through it.

13. USENET News

The USENET newsgroups look very much like the listserv groups. Many listservs also contribute their messages to a USENET newsgroup so content can be identical. The difference is in how the messages are distributed and how they are read.

Instead of sending each message by email to each subscriber a USENET news moderator contributes the group output to a central location. Your system administrator will also set up a central place to gather several gigabytes of "newsfeed." Several times a day a news archive talks to several neighbor archives and gathers new "news." It doesn't take long for group contributions to migrate around the world.

These local archives are read by programs called TIN or RN. TIN is better. You start these programs by typing tin or rn at the UNIX prompt. They have manual entries. You can also find out more about these through the CTC gopher or through the main menu in PINE.

I think that the Listservs and USENET are the true "heart" of the Internet - and show how it will add to the ways we interact in public settings. (IRC and the bulletin board services have the same flavor but with even more immediacy.)

14. Gopher and Lynx

These guys are your gateway to the "library type" Internet resources from CTC.

Gopher will let you traverse gopherspace, from the Mother Gopher at University of Minnesota to the farthest gopher hole. Almost every university has a gopher server, and you have access to their offerings.

Gopher presaged and inspired the invention of the World Wide Web, also known as WWW or simply "The Web."

Lynx is our way of accessing the (text only) bounties of The Web. The Web is organized as one humongous interconnected document, with parts residing on thousands of computers all over the world. You get from one fragment of this document to another by following hyperlinks. You will see a hyperlink as a highlighted word or reference in the body of the part you are reading. To follow the reference just go to the highlighted word and press "return."

To fire 'em up type "gopher" or "lynx" at the prompt.

There are manual entries for them too.

For a "second pass" at this stuff check out Adam Engst's "Internet Starter Kit" (in two versions - one for Windoze, one for Mac.) I have also found "The Internet Complete Reference" by Hahn and Stout to be a great source. These two (available as fat paperbacks at fine bookstores everywhere) are the only books with which I am personally familiar. Others may be great too. One or both should be enough to give you the big picture. Once you get up and running you will have easy access to more information - "books" you can download - than you will know how to handle. My last advice is to plan on eventually getting a big hard drive. Prices are under fifty cents a meg and your personal library stacks will be worth it.

Surf's Up !!!

Please be aware that this is a work in progress. I have fielded so many questions here at BCC about "how to get started" on the Internet that it seems even something at this stage of disorganization might be useful. Please send me any observations about typos, errors or points I have missed. Travails and SOLUTIONS involving file transfers (ZMODEM, XMODEM and Kermit, especially) would be most appreciated. I will respond to questions as soon as possible - quickly if I happen to know the answer... ;-)

Larry Susanka
(206) 641-2484

(This page was last modified on 8/19/96.)
SciDiv Developmental Page HTML Technique CGI and the WebServers Net Services News