How to use PuTTY.exe
You need two files, PuTTY.exe and psftp.exe. They can both be found
and downloaded from the same site.
What is PuTTY.exe and psftp.exe?
PuTTY.exe is a program that makes Windows users
establish a secure connection to Unix (and Linux) terminals, among
other things. psftp.exe is a program that makes it
possible to copy files from cochise to your local machine and vice
versa.
How to get the programs
They are found may places, a.o. at http://putty.gyron.net/. Go to the
Download page, download both PuTTY.exe and psftp.exe, and put them in
a folder where you store your programs. Make an alias somewhere
(e.g. on the desktop, or drag them to the taskbar on the bottom of
your screen) so that you can find it later.
How to connect to cochise
Doubleclick on the PuTTY.exe icon, and get a small box in return. To
the right, you are prompted for "Host Name". Write
cochise.uit.no. Click on SSH under "Protocol" and click on
"Open" at the bottom of the window.
If everything is ok, you will find a new window in front of you,
prompting for your user name. Write it, and then press the ENTER key,
and write your password, followed by ENTER. Then you are logged in.
After the session, remember logging out by writing
logout. Also, remember that you may have several windows open
at the same time.
How to copy files between cochise and your own machine
Doubleclick on the psftp.exe icon. Write "open cochise.uit.no" at the
prompt. Give your user name and password. To get files from cochise, you
write "get", and to copy files to cochise, you write "put". The syntax is
"get sourcefile resultfile" (and the same for put). In order to copy
e.g. the file gt/sme/src/noun-sme-lex.txt, write this command:
get gt/sme/src/noun-sme-lex.txt noun.txt
Since it easy to get confused with the get and put commands, I always
use another filename for the file I copy to. If you use the same name
twice, and copy the wrong direction, then the old file will replace
the new one, and your work will be lost.
Note that psftp.exe makes it possible to use standard unix
commands. Cf. the psftp.exe help
file for a list of commands.
Copy many files at the same time with psftp.exe
The psftp.exe program cannot use the * notation when copying files,
one must write the name of each file separately. The way of copying
many files in one operation is to use putty.exe to lump them together
in one archive file, and then use psftp.exe to move that file to your
local machine, and unpack it there. We give two actual examples. The
first copies all the html files from the doc catalog, and the other
one copies all the txt file from the sme/src catalog. The first step
is to open a window with putty.exe, and make two archive files. We
assume that you stand in your home directory, and write the following
commands, the first to copy the html files, the second to copy the
program's source files.
tar cf - gt/doc/*html | gzip > d.tar.gz
tar cf - gt/sme/src/*txt | gzip > s.tar.gz
The file names d and s are chosen arbitrarily in order to avoid
writing long names, the suffixes .tar and .gz indicates the file type
(the files are compressed twice, first by tar and then by gzip). If
you want to actually see what files you copy, you may write
cvf instead of cf after
tar, the v instructs the tar command to tell what it
does. If you only copy small files, or have a very fast computer, the
gzip part is not necessary, then a simpler "tar cf d.tar gt/doc/*html"
will do, the gzip part of the command just makes download time 1/3
shorter than tar only).
Then you must copy the files to your local machine. In order to do
that, open a window in psftp.exe, and give the following command, just
as described before (note that s.tar is so big that it might take some
time to download it.):
get d.tar.gz d2.tar.gz
get s.tar.gz s2.tar.gz
The files d2.tar and s2.tar may then be opened on your local Windows
machine with the winzip program (doubleclick on the d2.tar and s2.tar
files, and Winzip will open. Answer yes to open the
.gz file, then select all the files that will appear as a list
(ctrl-A) and click on "Extract"), and as a result you have all the
documentation files, and all the source text files, on your local
Windows PC.
Trond Trosterud
Last modified: Fri Dec 20 08:21:14 GMT 2002