Under construction

FTP transfers| Kermit transfers| Zmodem transfers| Miscellaneous methods

Transferring files to or from a PC

When you are transferring files between systems it's very likely you will have to know something about the content of the file before you try to transfer the file. The reason for this is that Unix and DOS use different End-Of-Line (EOL) characters. Unix uses a single LineFeed (LF) character (0a hex). DOS uses a Carriage Return (CR) (0d hex) LineFeed combination (CRLF). Transferring a file in ASCII or text mode will automatically change the end-of-line information. If you don't transfer text files correctly, then then end-of-lines won't get translated properly. Conversely, if you transfer a binary file using text mode, then it WILL translate characters, which will give you a corrupt file.

Also, note that wildcard are slightly different between DOS and Unix. *.* to DOS means all files, while to Unix it means all files with a '.' in them. * to Unix means all files, but to DOS usually means all files without a file extension.

Transferring using FTP

If you are lucky enough to have TCP/IP running on your computer (either via a direct connection to Huskernet, or through some dialup provider), you can use FTP (the File Transfer Protocol) to move files around. This works extremely well (and quick if you are directly on Huskernet). There are various versions of FTP different ways to start it, depending on the package, so those details will not be covered here.

To transfer a file, start ftp (here we assume typing ftp will start up ftp). FTP usually will transfer files in ASCII (text) mode by default. However, you can explicitly request ascii by typing ASCII (sometimes 'text' depending on the FTP client). To request binary transfer type binary (or sometimes image).

FTP has two ends to it. The client side is where the connection is initiated from. If you are logged onto a workstation and you ftp to a remote site, the local workstation is still the client end. The other end of the connection is the server side. It is where you are connecting to. You'll have to know which end is which in order to transfer files. The commands to transfer files are get to transfer a file from a server to a client, and put to transfer a file from the client to the server. With a PC, usually the PC is the client end, and the workstation is the server (typically, but not always!).

If you want to tranfer multiple files, FTP usually has the commands mput and mget for multiple get or put. Often these will prompt you for each file unless you tell the client not to ask (with a command such as nointeractive or prompt). To see what files are on the remote system, use the dir command. If you need to change directories, the cd command is used. And when you are all done, use the quit command to close the connection.

A typical session might look like:

~> ftp engrs1
Connected to engrs1.unl.edu.
220 engrs1 FTP server (Version 4.13 Wed Apr 27 08:16:51 CDT 1994) ready.
Name (engrs1:jdoe): ftp
331 Guest login ok, send ident as password.
Password:
230 Guest login ok, access restrictions apply.
ftp> dir
200 PORT command successful.
150 Opening data connection for /bin/ls.
total 32
drwxr-sr-x   2 root     mohonk       512 Mar  2 1995  bin
drwxr-sr-x   2 root     mohonk       512 Mar  2 1995  etc
drwxr-sr-x   2 root     mohonk       512 Mar  8 1995  lib
drwxr-sr-x   5 root     mohonk       512 Mar 18 16:04 pub
226 Transfer complete.
ftp> cd pub
250 CWD command successful.
ftp> dir
200 PORT command successful.
150 Opening data connection for /bin/ls.
total 904
drwxr-sr-x   3 634      mohonk      2048 Mar  4 16:02 eeshop
-rw-r--r--   1 root     mohonk    450560 Mar 18 16:04 imagestuff.tar
drwxrwsr-x   9 mohonk   mohonk       512 May 17 1995  mohonk
drwxr-sr-x   2 root     mohonk      1024 Aug 29 1995  tmp
226 Transfer complete.
ftp> get imagestuff.tar
200 PORT command successful.
150 Opening data connection for imagestuff.tar (450560 bytes).
226 Transfer complete.
453317 bytes received in 1.08 seconds (410 Kbytes/s)
ftp> quit
221 Goodbye.

Transferring using Kermit

Determine if you have a kermit setup that will work with a kermit server, as opposed to just plain kermit. If you see functions like 'logout of kermit server', 'finish kermit server', or 'get or put file from/to kermit server', you probably do. If so, go to the section on transfering files with a kermit server. (For instance, in Procomm, instead of doing page up/page down to see the transfer menu, kermit server mode is in a menu under ALT-K) If all you see if something about get file via kermit, then go to the subsection on transfering files without a kermit server

The best kermit software can be configured to run faster than Zmodem. The Kermit FAQ document is also available.

Using kermit server mode

First thing to do is log on to a workstation using your modem. It's assumed you know how to do this part. If you are using a menu system of some sort, you'll need to select an option to go to Unix. Again, binary files have to be treated different from text files. The client side is almost always your PC, and the server end is the workstation.

For text files, type kermit -x. For binary files type kermit -ix. These commands put kermit into what is known as server mode. Using server mode, you can issue commands from a kermit client to transfer files, create directories, change directories, etc.

To transfer a file from the Workstation to a PC (download), type get filename. To transfer a file from your PC to the workstation (upload), type put filename. Wildcards work with both of these command (see caveats in first section however).

Repeat as necessary

If you have a good kermit client program, you should have commands available for changing directories, doing directories, etc. Those are typically client dependent, so they won't be covered here. See your software manual...

When you are done, select finish kermit server that should be in the same place as your other kermit commands. In the real kermit, you issue the finish command. As an alternative, a bye command is usually available which stops the kermit server and logs you out.

Using kermit file mode

First thing to do is log on to a workstation using your modem. It's assumed you know how to do this part. If you are using a menu system of some sort, you'll need to select an option to go to Unix. Again, binary files have to be treated different from text files. For sending text files, type kermit -s filename. For binary files type kermit -is filename. Then, do whatever sequence (mouse or keyboard) you need to to receive a file (eg, in procomm, you would press page-down and then select kermit receive)

For recieving text files, type kermit -r filename. For binary files type kermit -ir filename. Then, do whatever sequence (mouse or keyboard) you need to to send a file (eg, in procomm, you would press page-up and then select kermit send and then type in the name of the file to transfer).

Repeat above steps as necessary.

Transferring using Zmodem

This section is not as concrete as the other sections... It seems that the UNL modem pool may or may not hel you transfer files using Zmodem. Some people have said they have to break back to the terminal server prompt (by issuing a break signal) and typing set session passall or set session pasthru to get Zmodem to work. And, some folks have had to add a -e to their sz|rz commands.

For sending text files, type sz filename. For binary files type sz -b filename. Then, do whatever sequence (mouse or keyboard) you need to to receive a file (eg, in procomm, you would press page-down and then select Zmodem receive)

For recieving text files, type rz. For binary files type rz -b. (Zmodem sends the file name as part of its protocol.) Then, do whatever sequence (mouse or keyboard) you need to to send a file (eg, in procomm, you would press page-up and then select Zmodem send and then type in the name of the file to transfer).

Miscellaneous file transfers

ASCII transfer

At least one person with an older Mac who was annoyed at the slow transfer rate of his kermit took another suggestion. Since error correcting modems are almost always in use, the data should arrive in perfect order. So, he would just cat filename on the Unix side, and set his Mac to log to a file. Or, the other direction, he would cat < filename and then upload a text file. He had great transfer rates using this method.


Last Update: 26-March-1996 13:00:00