[an error occurred while processing this directive]
[ FTP/Fetch ] [ Kermit transfers ] [
Text vs. Binary ] [ Exporting from Pine ]
[ Sending Files with Pine ] [ Attachments ] [ Printing
email ] [ Cleaning up ]
NOTE: These instructions assume you have a Minerva/Pantheon
account and are using a machine that is somehow connected to the network.
Why transfer files?
Knowing how to transfer files can be useful if you want to save a copy of
and/or print your email, if you want to send a file via email using Pine,
if you receive such a file, or if you want to do anything that requires
that you move a file from one machine to another.
Exactly how you transfer a file depends on how your local computer is
connected to the network. If it has a direct connection, or if it has
an ARA or a PPP modem connection to the network, then you will use a
program called FTP (or Fetch). If you are dialing in
with a modem but have a Shell account connection (also known as Remote
Terminal Access), you can't use FTP so you have to use a program that can
do what's known as the Kermit transfer protocol.
Using FTP/Fetch
You use FTP/Fetch to establish a connection between two networked
computers. Once the two computers are connected, you can use the program
to copy files back and forth between the two machines. In order to use
FTP/Fetch, you will need to know the full address of the machine you want
to connect to, and where (i.e. in what subdirectory) the file you want to
copy is located.
- Start the FTP/Fetch program (look in the Internet Tools
folder/program group). You should see a screen where you can enter
connection information.
- Enter the Host (or Hostname) information. If you are connecting
to your Pantheon account, this should be "minerva.cis.yale.edu".
- Enter your User ID. This is the name with which you log into
your Minerva/Pantheon account (also known as a NetID and a Username).
- Enter your Password.
- All other information on this first screen is optional. Click "OK".
- Here the PC compatible (FTP) and Macintosh (Fetch) versions
diverge a little:
- PC compatible
- The window is split into two halves. The left half represents your
local machine (i.e. the computer in front of you) and the right half
represents the remote machine (i.e. Minerva). In each half, the upper
portion of the window displays both subdirectories of the current
directory and any other available disk drives, and the lower portion
displays files in the current directory.
- To send a file from your local machine to the remote machine,
select the file you want to send by locating it (double-clicking on drives
and/or subdirectories if necessary) and clicking on it once. If you there
is a particular directory on the remote machine in which you want to put the
file, you may double-click on that directory to select it. Choose the
appropriate type of transfer (ASCII or binary -- for a discussion of this
see below), then click on the arrow that points in the direction you want
to send the file. A transfer status window should flash on the screen, et
voila! the file is transferred.
- To get a file from the remote machine onto your local machine, the
process is exactly the same in reverse. Select the file on the remote
machine that you want to transfer, select which directory on the local
machine you want to put it in, choose the type of transfer, and click on
the arrow that points in the direction you want to send the file.
- Macintosh
- You see a window that shows you the contents of the directory you
have selected on the remote machine (when you connect to minerva, it
automatically selects your home directory).
- To send a file from your local machine to the remote machine, click
on "Put File". Up pops a window that lets you select the file you want to
send (if you don't see the file you want, try clicking on "Desktop" and
searching from there). Select the file and click on "Open". Enter the
name you want the file to have when it's on the remote machine, select the
appropriate transfer format (see below for a discussion of text vs.
binary), and click "OK". You should see a brief display on the right side
of the window indicating the status of the transfer; when that
display disappears the file has been successfully transferred.
- To get a file from the remote machine onto your local machine,
select the file you want to transfer, choose the appropriate type of
transfer (Automatic usually works pretty well) and click "Get File". You
should be prompted where you want to save the file, so just select the
appropriate directory and click on "Save".
- When you're finished, be sure to quit out of the FTP/Fetch
program, especially if you're using it on a public machine.
Using the Kermit transfer protocol
There are a number of programs which can handle the Kermit protocol. On
the PC side, the ones we support are Kermit (DOS), Terminal (Win31), and
HyperTerminal (Win95). For the Macintosh, we support TinCan (which we no
longer recommend, however) and MacKermit. There are many other programs
out there that will do Kermit, and you are under no obligation to use the
ones we support, but be forewarned that we may not be able to answer
questions about programs we don't support.
In order to transfer files using the kermit protocol, you must actually
have two programs running, one on each machine, each of which must be able
to do the kermit protocol. These two programs, instructed by you,
negotiate the transfer of the file. The process is as follows:
- Connect to the terminal server and log into your Minerva/Pantheon
account. If you don't already know how to do this, refer to the handy Dialing in with a NetID document available
from the Internet Information Center.
- To send a file from your local machine to the remote
machine:
- At the minerva% prompt, type "kermit". This starts the
C-kermit program on minerva, which handles the kermit protocol on the
remote end of things.
- Type "set file type text" or "set file type bin" depending on
whether the file you want to transfer is a text file or a binary file (see
the discussion below on text vs. binary transfers).
- Type "receive". C-Kermit will tell you that it's ready to
receive a file, and that you should return to your local kermit and give a
send command.
- From your local communications program (i.e. Kermit,
Terminal, HyperTerminal, TinCan, MacKermit, etc.) select the file to be
sent, and tell the program to send it. How you do this varies from
program to program:
- PC compatible
- Kermit: Type alt-x to get a command line. Type "set
file type text" or "set file type binary". Then type "send" followed by
the name of the file you want to send. From the command line you can use
some normal DOS commands (like "cd" to change directory, or "dir" to view
the contents of the directory) to help you find the file you want to
transfer. Once the file has finished transferring, type "c" to get back
to the connection screen, then type "quit" to quit the C-Kermit program.
- Terminal: make sure Terminal is set to do the kermit
protocol by selecting "binary transfers" from the "Settings" menu.
Terminal is strange in that if you want to use the kermit transfer
protocol you must do a binary transfer. So, select "Send Binary File"
from the "Transfers" menu, choose the file you want to send, and click
"OK". After the file has finished transferring, type "quit" to quit the
C-Kermit program. The "Send Text File" option in the "Transfers" menu
does work, but it doesn't use kermit; using it is equivalent to typing out
(very quickly) the contents of the text file. To use it, therefore, you
must be running a word processing program on minerva (like pico, or while
composing an email message). While that program is running, you may
select "Send Text File" and the text will appear in the open document just
as if you typed it. If this makes no sense to you, stick to binary
transfers.
- HyperTerminal: Select "Send File" from the "Transfer"
menu. Choose the file you want to transfer, click on "Open", then click on
"Send". Once the file has transferred, type "quit" to quit the C-Kermit
program. Like Terminal (see above), HyperTerminal's "Send Text File"
command just sends the contents of the text file as if typed from the
keyboard.
- Macintosh
-
- TinCan: Select "Send File" from the "File Trans"
menu, choose the file you want to transfer, click on "Send". When
prompted, enter a name for the file on the remote machine and select the
appropriate type of transfer (text or binary). When the file has finished
transferring, type "quit" to quit the C-Kermit program.
- MacKermit: Select "Send File" from the
"File-Transfer" menu. Choose the file you want to transfer, select the
appropriate type of transfer (text or binary), select "data" for text
files and "resource" for binary files, and click on "Send". When the file
has finished transferring, type "quit" to quit the C-Kermit program.
- To get a file from the remote machine onto your local
machine, do the same process in reverse. That is, start the kermit
program on minerva, tell it what type (text or binary) of transfer you
want to do, and tell it to send the file by typing "send" followed by the
name of the file you want to send. Then choose "Receive File" or its
equivalent from the same directory you chose "Send File" from (in your
communications program) and watch the file transfer away. The one catch
is that it's not always obvious where the transferred file is stored on
your system. Sometimes the transfer status window will give a destination
of the transferred file, some programs will ask you where you want to save
it. If worst comes to worst and you can't find the file you just
transferred, try doing a search for the file (command-f from the Finder
for the Mac, "Search" from the File Menu in the File Manager for Win31,
"Find" from the Start Menu for Win95).
Text (ASCII) vs. Binary
Simply put, everything that is not a plain text file is a binary file.
Binary files include image files, sound files, and most importantly, word
processing files. That's right, unless you specifically save a document
as "Text only" or "ASCII text" or some equivalent, your word processing
program adds a number of binary codes to the text of your document. These
codes contain formatting information and so affect how the text is
displayed (fonts, justification, footnotes, etc.) If you do a text transfer
of a binary file these codes will be destroyed. Sometimes a text transfer
is necessary, however, especially if you want a text file created on a Mac
to be readable on a PC and vice versa.
If you are using Fetch, you have the additional options when you "Put" a
file, of BinHex II, MacBinary, AppleSingle, or Raw Data. Rather than go
into a discussion of these here, suffice it to say that "Raw Data" is
equivalent to a normal binary transfer, while the other three involve
additional encoding of the information.
Exporting an email message from Pine to your home directory
Say you received an email message that you want to transfer to your local
computer (so you can print it, for instance). How do you get the message
into a file on your home directory so you can use the process described
above to transfer it? Simple: while looking at the message (in Pine),
type "E" (for Export). Give the file a name, hit return, and the file is
created. To check this, quit out of pine and type "ls" (for list) at the
minerva% prompt to get a listing of the contents of your home directory. You
should see the new file with the name you gave it.
Sending files via email using Pine
Files come in two varieties, as explained above: text and
binary. Text files may be sent as part of the body of an email message, so
that the recipient will just receive one (long) email message. A binary
file must be sent as an attachment (see below), and text files may also be
sent as attachments.
Method 1: Incorporating a text file in the body of an email message
- Transfer the text file to your home directory.
- Start pine and begin composing a message.
- Type "^R" (control-R) and enter the name of the text file. The
file should then appear as part of the message.
This method does not let you include any fancy formatting information, but
if you're not sure the person you're sending the file to knows how to
handle attachments, it is the most fool-proof way of making sure the other
person will be able to read your file. Most word processing programs let
you save documents as text; try looking under the "Save As" option.
Method 2: Send a file (binary or text) as an attachment
- Transfer the file to your home directory.
- Start pine and begin composing a message.
- Position the cursor on the "Attchmnt:" line and type "^J"
(control-J). Enter the name of the file, then enter a description
("Attachment comment") of the attached file. The name of the attached
file should appear on the "Attchmnt:" line.
You may want to write a note in the body of the email message explaining
what format the attached file is in and what the recipient should do with
it. This method is convenient in that it lets you preserve formatting
information for word processing documents, but it assumes that the
recipient knows how to deal with attachments.
Dealing with attachments
If you receive an email message that contains an attachment, first view
the list of attachments by typing "V" while you're looking at the email
message. Select the attachment you want to save, then type "S" to save it
as a file in your home directory. Then transfer it as you would any other
file (see above).
Printing your email
If you want to print email, and you've tried the "attached-to-ansi" print
option without success (see the section on
printing from Pine
in PantheonHelp), then you will have to transfer your email message to
your local machine and print it from a word processing program. To do
this, first export the message to a file in your home directory, then
transfer it as you would any other file (see above). Once the file is
transferred, open it with your favorite word processing program and print
to your heart's content.
Cleaning up
If you do a lot of file transfers you may end up with a bunch of old files
sitting in your home directory just taking up valuable space. When you
transfer files you're really only transferring a copy; the original stays
put. To get rid of a file in your home directory on Minerva/Pantheon,
type "rm" followed by the name of the file. BE CAREFUL, because once
you've removed the file it's gone and you can't get it back, period.
For other useful Unix file handling commands (of which rm is one), take a
look at the section in PantheonHelp on File Handling.
[an error occurred while processing this directive]