Sequoia Hall
Home Academics Research Consulting Industrial Affiliates People
    
Computing Guide
Our Brochure
Links



10. Utilities

Previous Computing Guide Contents Next

In this section we discuss some utilities for routine tasks.

10.1 Transferring files using ftp
Be sure to read the update below as ftp service into our systems will be disabled.

Many visitors to our department wish to transfer files to and from from other machines. If the files are on a machine on a network, the easiest thing to do is to ftp them, perhaps after using tar to archive the files and compressing using gzip.

If you have files on floppy disks, then you need an account on our PC to transfer the files. (Our new X terminals actually allow use of PC-formatted floppies, but the floppy drive has not been set up yet.) A guest account has been created on the PC for this very purpose. The user name is guest, and the password can be obtained from the secretary. This guest account is a privilege and you must not distribute it to anybody.

MS-Windows comes with an ftp program; however, it is so pathetic that I cannot really recommend it. The PC-Stanford package includes a GUI version of ftp called wsftp.

Here is a detailed example on file transferring from machine X to machine Y. We begin with the simplest situation and proceeds to other involved ones. Two points are always worth clarifying. The machine at which you are currently logged into is called the local machine, in our case X. The machine you want to transfer the files to is called the remote machine, in our case machine Y.

  1. Transferring a Single file. Suppose we wish to transfer a file named foo.dat. The following example shows a session where X is local.yourdomain.com and Y is remote.otherdomain.com. What I typed is shown next to ftp prompt.

    local> ftp remote.otherdomain.com
    Connected to remote.otherdomain.com.
    220 remote.otherdomain.com FTP server ready.
    Name (remote.otherdomain.com:naras):
    331 Password required for naras.
    Password:
    230 User naras logged in.
    ftp> binary
    200 Type set to I.
    ftp> put foo.dat
    200 PORT command successful.
    150 Opening BINARY mode data connection for 'foo.dat'.
    226 Transfer complete.
    local: foo.dat remote: foo.dat
    8 bytes sent in 0.012 seconds (0.67 Kbytes/s)
    ftp> quit
    221 Goodbye.
    local>
    The file foo.dat is now on the machine remote.otherdomain.com.
  2. Transferring Multiple files. Suppose we wish to transfer all files matching the pattern f*.dat. The following example shows a session where X and Y are again as above.
    local> ftp remote.otherdomain.com
    Connected to remote.otherdomain.com.
    220 remote.otherdomain.com FTP server ready.
    Name (remote.otherdomain.com:naras):
    331 Password required for naras.
    Password:
    230 User naras logged in.
    ftp> binary
    200 Type set to I.
    ftp> prompt
    Interactive mode off.
    ftp> mput f*.dat
    200 PORT command successful.
    150 Opening BINARY mode data connection for 'fish.dat'.
    226 Transfer complete.
    local: fish.dat remote: fish.dat
    7 bytes sent in 0 seconds (0.0068 Kbytes/s)
    200 PORT command successful.
    150 Opening BINARY mode data connection for 'foo.dat'.
    226 Transfer complete.
    local: foo.dat remote: foo.dat
    7 bytes sent in 0 seconds (0.0068 Kbytes/s)
    ftp> quit 221 Goodbye. local>

    The directive prompt toggles the interactive mode on and off. If the interactive mode is on, you'll be asked to indicate, for every file, whether you want it transferred or not.

There are many other nifty things you can do within ftp. You can change directories, delete files, transfer files the other way (use get and mget in place of put and mput). For example, cd foo will change directory on the remote machine while lcd foo will change directory on your local machine. See the man page for ftp for a full list of such facilities.

Important Update on FTP
Please note that starting December 14, 1998, we will disallow ftp access into all machines in our department. Please note the word ``into'' because you will still be able to ftp to machines outside our department, if those machines permit.

The Leland folks will also start clamping down on unrestricted ftp access this starting January 1, 1999. This is because the ftp service, like rlogin and telnet sends out passwords as clear-text over the network. A hacker can easily ``sniff'' your password. They have provided a solution for ftp by creating a dedicated machine called transfer.stanford.edu. The logic is that if ftp traffic is restricted to one machine in Stanford University, that machine can be monitored carefully for any signs of intrusion.

I outline some solutions based on common scenarios. However, please note that you should use the solutions below only if you cannot use any of the recommended approaches in section Security Issues. In all cases you will need to know your SUNet userid and password.

The Straightforward Way
To transfer files from machine X to machine Y, you proceed as follows.

  1. Transfer the file from the machine X to transfer.stanford.edu using your SUNet userid and password. Quit this ftp session.
  2. Transfer the file from transfer.stanford.edu to the machine Y. You'll again need your SUNet userid and password.

Thus, instead of a one step process, it is now a two-step process.

The Slick way
This method makes use of the following two facts that need to be better known.

  • The files you have on your Leland account are directly accessible from rgmiller.stanford.edu.
  • If your SUNet userid is gijoe your home directories on the Leland system is visible on rgmiller as the directory /afs/ir/users/g/i/gijoe. Note how the first two letters of your SUNet userid are used as parts of the directory hierarchy.

To give concrete illustrations, I will again assume in the examples below that the user is joe on rgmiller.stanford.edu and that his/her SUNet userid is gijoe.

First, follow the instructions in Accessing your Leland Files.

Ftping a file from rgmiller to another machine
Let us assume that we want to transfer file fish.dat from rgmiller to the machine joe-home.wherever.com.

  1. On rgmiller do the following.
    rgmiller %1 cp fish.dat /afs/ir/users/g/i/gijoe
    This step copies the file to your Leland directory.
  2. On joe-home.wherever.com, start an ftp session to transfer.stanford.edu and retrieve the file as usual.
  3. This step is optional, but recommended if you don't want to run over your quota on the Leland system or clutter up your Leland space.
    rgmiller %2 rm /afs/ir/users/g/i/gijoe/fish.dat

Ftping a file from another machine to rgmiller
Let us assume that we want to transfer file fish.dat to rgmiller from the machine joe-home.wherever.com.

  1. On joe-home.wherever.com, start an ftp session to transfer.stanford.edu and put the file as usual on transfer.stanford.edu.
  2. On rgmiller do the following.
    rgmiller %1 cp /afs/ir/users/g/i/gijoe/fish.dat ~
    This step copies the file to from your Leland directory to your home directory. You can change the home directory to any other directory you want.
  3. This step is optional, but recommended if you don't want to run over your quota on the Leland system or clutter up your Leland space.

    rgmiller %2 rm /afs/ir/users/g/i/gijoe/fish.dat

10.2 Equipment for Classroom Demonstration
Several people have asked about the equipment in technology classrooms, projection equipment etc. The Registrar's Office maintains a list of all classrooms in Stanford, including those with special equipment.

What does the department have for a computer/projector?
You are, of course, free to use your own laptop for classroom demonstrations.

The department has a portable projector that can be used with a PC or laptop to project slides. It may be borrowed from Judi Gray.

What information is needed to use a computer in such a classroom?
Before using a computer in such classrooms, it will have to be configured. The configuration information should soon be available from the web page. For now, please contact:

Anthony Paoletti Phone: 3-7280 e-mail: paoletti@leland

If you want these machines on specified dates or through the quarter, you'll have to request it from me.

10.3 Changing Passwords
Most of you will be using our SGI server RGMiller most of the time and therefore you should change your password there. We don't run NIS (aka yellow pages) for security reasons, which means that your passwords are separately maintained on each machine. If you want to change your password on all our machines, you will have to do this separately on all three machines, RGMiller, Girshick and Playfair. To change your password, you use the passwd command.

rgmiller 1% passwd

You will be prompted for your old password. Then you'll be asked to type in your new one, twice, for confirmation.

Please do use good passwords and remember once again, that the passwords do not get propagated on all our department systems. Once we move completely to a kerberos infrastructure, we'll have a single password system.


Previous Computing Guide Contents Next


Contact  | Sitemap  | Directories  | Maps  & Directions  | Giving to Stanford
Copyright 2004Stanford University. All Rights Reserved. Stanford, CA 94305, (650) 723-2300
Terms of Use Copyright Complaints