Working on Athena

 

On this page:

Overview

Working with Athena Equipment
Athena Workstations
Differences Among Workstations
Special Keys and Control Characters
Athena Printers
Locating Workstations and Printers

Logging In
Logging In On an Athena Workstation
The Login Options Menu
The Next Step
Possible Login Problems

Logging Out
Logging Out from a Terminal Window
Logging Out from a Workstation
If You Cannot Log Out
Rebooting Your Workstation

Working with Windows
Creating Windows
Getting Rid of a Window
The Window Manager ( sawfish)

Working with the OS
The Operating System
The Shell
Entering Commands
Case Sensitivity
Fixing Typing Errors/Bailing Out

Email on Athena
Adding Yourself To a Mail List
Removing Yourself from a Mail List
Getting Your Own Mail List
Forwarding Your Mail

Zephyr on Athena
Checking if a User is Logged In
Sending Zephyrs

The World Wide Web
Mozilla
Certificates

Protecting Your Account
Keeping Your Files Safe
Choosing a Password
Changing Your Password

Working Within Your Quota
Checking Quota
Exceeding Quota
Getting Below Quota
Getting a Quota Increase

Working with Files
File Names
File Naming Conventions
Wildcards: * and ?
Testing Wildcards with echo
Creating a File
The cat Command
The more Command
Copying a File ( cp)
Moving or Renaming a File ( mv)
Listing the Files in a Directory ( ls)
Removing a File ( delete and rm)
Using delete
Using the rm Command

Working with Directories
Directories, Pathnames, and the File System
AFS Cells and Volumes
The attach Command
The Working Directory
Finding Out Where You Are
Creating a Directory
Changing the Working Directory
Removing a Directory
Sample File/Directory Specs

File/Directory Command Summary

Sharing Files
Transferring Files Between Accounts
About Groups
Making Your Files Accessible
About Permissions and ACLs
Looking at Permissions
Setting Permissions
Using Subdirectories to Share Files
About File Mode Bits (rwx)

Backing Up and Restoring Files
The Importance of Backing Up Files
Using ~/OldFiles for File Restoration

Using Athena Without Logging In

What Happens When You Leave

Overview

This document assumes you have already registered for an Athena account and know your username and password. If not, see the document How to Register for an Athena Account.

The conventions used in Athena documents for describing special characters are:

  • C-x (sometimes Ctrl-x) means press x while holding down the Control key.
  • M-x means press x while holding down the Meta (sometimes alt) key.
  • Esc x means press x after pressing and releasing the Esc key.

See the section on Special Keys and Control Characters for details.

Working with the Athena Equipment

This section describes the workstations available in the Athena clusters, listing some of the differences between platforms and focusing on how to use the workstation keyboards. (You will need to know about certain special keyboard characters in order to work on Athena.)

Before you start to use Athena, be sure to also familiarize yourself with the Athena Rules of Use. Many of the rules presented there deal specifically with the use of Athena equipment.

Athena Workstations
Rather than having a single computing center, Athena has over 600 end-user workstations distributed around campus in both general-use and departmental "clusters". Each cluster consists of a certain number of workstations (ranging from under a dozen in some cases to over a hundred in the Student Center cluster) plus one or more printers, all gathered in one room.

A workstation is a complete computer, not just a terminal connected to a computer. Nevertheless, workstations in the Athena environment are not stand-alone machines -- they are connected to many other computers and other devices such as printers in a vast network.

Additionally, Athena has many Quickstations located around campus. A Quickstation is a workstation which has all of the capabilities of an Athena workstation. However, Quickstations are only intended to be used for ten minutes; after ten minutes, the workstation strongly encourages you to log out. This way, users can access Athena quickly to perform functions such as checking their mail, or anything that can be done on Athena in ten minutes or less.

Differences Among Workstations
The following workstation "platforms" (machine/operating system combinations) are available in the Athena clusters:

Vendor
Model
Operating System

Dell

various

Red Hat Enterprise Linux 4

HP

various

Red Hat Enterprise Linux 4

Sun

Sunblade

Solaris 10

To determine what kind of workstation you have, you can look at the the computer itself; the type of workstation is printed on the box. If you do not have access to the computer itself, on the Suns you can use the machtype command; type machtype -c at the Athena prompt.

To determine what operating system your workstation is running, use the uname command; uname tells you the name of the operating system, and uname -r tells you the version number.

The major differences that regular users need to know among these currently supported workstation types include:

  • Keyboard. The layout and labels of the keys on the keyboard differ in small but important ways across workstation types. The most significant differences concern the keys used to handle the Meta and Delete functions. (See the section on Special Keys and Control Characters for more details.)
  • Size and Appearance. Monitor sizes vary among workstation types and so forth. The differences in screen size are particularly important if you customize your screen layout (see the Dotfiles document) or develop programs that use the screen's graphical capabilities.
  • Available Software. Programs compiled on one workstation type will run on other workstations of that type, but must be compiled separately for workstations of other types. Software that takes advantage of specific workstation features may not even run on other workstations. Certain third-party programs on Athena have only been developed for use on certain platforms. (See the web page Summary of Available Athena Software for details of which software packages run on what workstation types.)
  • Computing Power. Workstations differ significantly in terms of how much memory they have available for performing calculations and temporarily storing information.

Special Keys and Control Characters
The keyboard attached to each workstation has many more keys than a typical typewriter keyboard, but for most purposes you do not need to know about these extra keys. For most of your interactions with Athena, you will only need to use the usual typewriter keys in the main keyboard area (including Shift and Caps Lock), plus some special keys. A few of these are detailed here.

  • The Control key modifies the effect of another key you press at the same time, and can modify the meaning of a key quite significantly, depending on context. For example, Shift-c just produces a capital C, but Control-c can mean "cancel the current command". The Control key is located just above or below the left Shift key, and is always labeled "Ctrl". A key combination involving the Control key is known as a "control character". Control characters are referred to in any of several ways, including Ctrl-, C-, or ^ ; Athena documentation uses the Ctrl- or C- form. If several control characters occur in a row, they are always indicated separately (thus, for instance, C-x C-u is different from C-x u).
    There are many control characters which are useful when working with Athena. Among these are:

    • C-c cancels the current command.
    • C-z suspends what you are working on.
      • To be able to work on the process which you suspended, using both the window in which it was launched and any windows which it created, type fg (for foreground.)
      • To be able to work on the process in only the windows which it created, type bg (for background.) If the process needs input from the terminal in which it was started, it will wait to be foregrounded.
    • C-d is the end-of-file character; it will end zephyrs and other files.
  • The Meta key, like the Control key, modifies the effect of another key, and is labeled quite differently depending on the workstation type. The Meta key is usually referred to in documentation as M-, as in M-x (which means hold down the Meta key, press the character x, then release the Meta key). The Meta keys on the Suns are the ones with diamonds on them to the left and the right of the space bar; the Alt key will also function as the Meta key for all practical purposes on the Suns.

What actually happens when you press a key is determined by the computer program you are using. If you press a key that has no meaning to the program you are using, you may see strange characters appear on the screen; don't panic. In most cases you can clean up any strange characters by deleting the characters.

Athena Printers
In addition to the workstations, Athena provides about 25 laser printers (mostly Hewlett Packard LaserJet 8150) in various locations around the campus, including most Athena clusters. In addition to multi-font text, these printers can produce copies of graphic images directly from the display of an Athena workstation, and can print double-sided in both landscape and portrait mode. All of the Athena printers use plain white paper, except for the printer "thesis", which uses archival bond paper (it is intended only for final drafts of theses).

For a summary of the printing privileges and limitations associated with an Athena account, see the section Assuring Fair Access to Athena Printers in the Athena Rules of Use.

For detailed instructions on how to obtain hardcopy output from Athena, see the document Printing from an Athena Workstation.

Locating Workstations and Printers
A list of all the Athena clusters and printers, noting their locations and abilities, is posted in every cluster. The list is also distributed on a small reference card entitled "Athena Clusters Pocket Reference", which you can pick up free in the Athena Consultants' Office (first floor, N42) during office hours, or in the Student Information Processing Board office (W20-557), or on the back of the Athena Pocket Reference [ Adobe Reader required].

To find out the current status of the Athena clusters, type xcluster or cview at the athena% prompt, or select Help > Athena Help > Clusters > Locations and Machines Available from the panel menu (it looks like a footprint) at the bottom of your screen. cview can also be found on the Web at http://www.mit.edu/cview. The status of all of the public cluster printers can be found by typing cview printers at the Athena prompt, or at http://www.mit.edu/cview?printers.

Logging In

Logging in is the process of identifying yourself to a computer and being given the right to use it. You supply the computer with your username, and your password. (If you don't have a username and password, you need to register for an account before you will be allowed to log into Athena; see How to Register for an Athena Account.)

For Athena, logging in involves gaining access to the workstation itself, the Athena facilities available over the network, and, especially, your private Athena workspace. You can log into Athena in either of these ways:

  • At a workstation in an Athena cluster: You can go to an Athena cluster and log into Athena directly on a workstation (the method described here). The login window on Athena workstations offers you several different types of login session; see below for more details.
  • Via remote login: If you are on a computer that has network access to MITnet (the network Athena is on), you can remotely log into the Athena dialup server directly over the network. Use your system's ssh, secure telnet or rlogin command to connect to a dialup machine, such as athena.dialup.mit.edu. This method can also be used to remotely log into one appropriately configured Athena workstation from another Athena workstation.

You can also use Athena without logging in; see the appendix, How To Use Athena Without Logging In, for how to do this, and what sorts of things you can do.

Logging In On an Athena Workstation
It is easy to log in to an Athena workstation if you have an Athena account. If you want to use a non-standard session type, select the option you want from the Login Options menu. (If you want a standard session, proceed to the next step).

The Login Options Menu The Login Options menu helps you log into Athena in the mode that best suits your needs (regular session, terminal-style session, initial mail-check, etc.), or helps you log in successfully even if some configuration you have made prevents your normal login. Select a session style by clicking on the Login Options button and selecting the choice you want, or by pressing the function key associated with the style you want (see the table below). The style you select is indicated by a message in the main login window.

Key
Selection
Resulting Session Type

F1

Your usual login session

Standard Athena login, using your customizations ("dotfiles").

F2

Ignore your customizations

Standard Athena login, ignoring your customizations ("dotfiles").

F3

Terminal-style session

No-frills Athena session, using only your tty-oriented customizations (one xterm, no window manager).

F4

Check your e-mail

Summary of e-mail waiting for you (as determined by from command) is displayed in the console window, with option to continue login or cancel session.

F5

Specify special login

Run a shell script (you specify pathname of executable script) and bypass standard xsession script.

F6

Start over

Return selection to default login choice ("Your usual login session") and clear anything already entered for username and password.

The Next Step
At any unoccupied workstation that displays the words "Welcome to Athena", enter your username and password in the fields provided. If you have entered your password in the password box, it will not appear on the screen.

The login window disappears. If you have entered a valid username and password, a console window appears in the upper right hand corner of your screen a few moments later. In this console window, the system displays a series of messages like the following to indicate the progress of your session startup:

14:32 Athena Workstation (sun4) Version 8.1.18 Tue Jun 23 00:42:13 EDT 1998
        14:32 Setting up environment...
        14:33 Starting Metacity window manager...
        14:33 Starting the Athena Dashboard...
        14:33 Creating logout button...
        14:33 Creating initial xterm window...
        14:33 Running standard startup activities...
        14:33 You have 2 messages (172890 bytes) on PO9.MIT.EDU.
        14:33 Session initialization completed.

If you have customized your session through the use of configuration files ("dotfiles"), other messages might appear as well. (See the document Dotfiles to learn more about using configuration files to customize your session.) You can get rid of the console window by clicking on the Hide button.

After a few moments, the Panel menubar appears at the bottom of your screen, and the login process creates a Terminal window. After a short initial pause, the window displays the following prompt:

  athena%

This is the Athena system prompt, and it indicates that you have logged in successfully. The system uses this prompt to indicate that it's waiting for you to enter a command. You are now ready to work in the Athena environment.

Possible Login Problems
Here are some of the common error messages you might receive in trying to log into Athena, and what to do about them.

  • Unknown user name entered or Incorrect password entered.
    The workstation does not let you log in if you mistype your username or your password. Try logging in again, and be sure to type your username and password exactly as you gave them to the registration program when you originally registered for your Athena account; don't insert blank spaces, and remember that there is a difference between lower case and capital letters. One common cause of the unknown username error is simply hitting the spacebar accidentally before typing your username.

    If the error recurs, and you are certain you are typing your username and password correctly, contact Athena User Accounts at x3-1325. You will have to go there (first floor of N42) with a valid MIT ID during business hours in order for them to help you.
  •  
  • Login incorrect or You are not allowed to log in here.
    This error usually occurs when you try to log into a machine you don't have access to. Unless you know differently, the only machines you can log into are the workstations in the Athena clusters and the dialup servers. These can also occur when you mistype your username, typing the name of another (or a nonexistent) user.
  •  
  • Unable to attach your home directory.
    Your home directory, the private workspace where you keep your files, is stored on one of several large file server computers located somewhere on the network. You normally don't have to worry where the server is -- when you log in, the workstation you are using automatically finds your private workspace for you and gives you access to it. Sometimes, however, the fileserver machine that holds your files is "down" (inoperative), or the intervening network is having problems.

    If it has been more than a day since you registered, the most likely cause of this message is that your fileserver is down. To find out if this is the case, call the Consulting Hotline at x3-4435, or Ask OLC a Question.

    If, for some reason, the workstation cannot connect to your locker, the login process displays a message asking whether you want to continue with a temporary directory /tmp/ username. If you choose to go ahead with a temporary directory for that session, you will not have access to your locker. Therefore, you will not be able to get to your permanent files, and any files you create in /tmp/ username are deleted after you log out.

Logging Out

Logging out is indicating to the computer that you have completed your session and that it should perform the appropriate actions to disconnect you.

You should always make sure to log out of your session when you are through working on Athena. If you do not log out but simply leave the terminal, your private workspace will be accessible to whoever next uses that workstation. (When you do log out, in contrast, your account is protected.)

You can log out using any of the methods explained below. With any of these, you should be sure to wait a few seconds at your workstation to make sure that the system actually logs you out. You can tell that you have logged out successfully if your windows disappear and the initial login window reappears on your screen.

Logging Out from a Terminal Window
In any kind of session (workstation, dialup, remote login), you can log out by just typing the logout command at the system prompt:

  athena% 
logout   

If you are on a workstation, you can enter this command in any terminal window that displays the athena% prompt.

Note: In some instances, the system may return the message "There are stopped jobs" and not log you out. This means that a program you started from that window has been suspended (usually by your having typed Ctrl-z while the program was running) and has not been properly terminated. The system is giving you one final opportunity to take care of the stopped processes before you log out. (To see what jobs are stopped but not terminated, type jobs at the athena% prompt in the window in which you received the stopped jobs message.)

If you simply want to terminate the stopped jobs and log out, type logout again at the athena% prompt and the system will log you out. Otherwise, see the section on Special Keys and Control Characters for how to resume a job stopped by Ctrl-z.

Logging Out From a Workstation

If you are logged into an Athena workstation that displays an EXIT button on the Panel menubar, you can log out by using the workstation's mouse.

Click on the EXIT button (usually in the bottom right-hand corner of the screen).

The screen will become shaded and a dialog box will appear. If you really want to log out, click on the "Yes, logout" button. If you would prefer to remain logged in, click on the other button and the logout dialog box disappears and your screen returns to normal.

Note: Just clicking on the EXIT button does not by itself log you out -- you must confirm your logout request at the logout dialog box.

If You Cannot Log Out
If for some reason none of the above logout options is available (e.g., panel is not running and you exited your last terminal window accidentally), you will need to bring up a new terminal window so you can enter the logout command. See the section on Creating a New Terminal for details. Before assuming that the system is not responding, check to be sure that the keyboard is securely plugged into the workstation.

If for some reason the system is frozen and you cannot even use this method, or if the system will not respond to any logout method, you will have to reboot the workstation. Rebooting the workstation should only be done when absolutely needed.

Rebooting Your Workstation
If you need to reboot (restart) a workstation, either because the workstation has frozen or because it has been inappropriately locked by another user for more than 20 minutes, just follow the instructions below. ( Do not do this unless necessary.) If you encounter any trouble, please either contact a Consultant, or report the problem to the Athena Hardware Hotline (x3-1410, or hotline@mit.edu).

Machine Type
 
Reboot Sequence

Sun

Hold Stop and press a, then at the ok prompt, type boot.

Linux

Hold down control, alt, and press backspace.

After rebooting any machine, wait for the "Hit any key to start" message and start again as usual. If the machine will not reboot successfully (e.g., it gives a message that it has halted itself), call the Athena Hardware Hotline.

Working with Windows

The X Window System lets you divide your workstation's screen into one or more windows, which you can manipulate using the mouse, the keyboard, or both.

Creating Windows with Terminal and Panel
The Terminal program lets you create windows on your screen into which you can type commands and receive information.

Your initial terminal looks like this:

To create a new terminal window, click on the "Prompt" button in the Panel.

You can also start a new terminal window by typing:

  athena% 
gnome-terminal &

The system returns something like:

  [1] 8389
  athena%

Don't forget to type the & after gnome-terminal. Using the & causes the gnome-terminal program to run in parallel with the first window. If you don't type the &, you won't be able to work in your original window, since you will be running xterm in it. The [1] means that this is your first background process and the 8389 is its Process Identification number, or PID.

Whichever way you choose to start it, a new terminal window that is 80 columns wide and 24 lines high will appear on your screen. You can move the window to wherever you want it on your screen by clicking on the title bar with the left mouse button and dragging the window to the location you desire. When you release the mouse button, the window will stay in its new location.

Note that after you have created a window, you may have to wait a few seconds for the prompt to appear before you can type commands. Once the prompt appears, you have another window to work in.

Getting Rid of a Window
You can get rid of a terminal window by typing exit in the window you want to remove. This kills the process and makes the window vanish.

Terminal windows have many features that you can customize (e.g., the scroll bar, fonts, and colors). Click on the Settings menu at the top of your terminal window and choose Preference to adjust your terminal window settings. Alternatively, you can use the On-Line Consultants available on Athena; type olc at your prompt. At the olc prompt, type answers. Once you are in the section of answers, choose X Window System. The stock answers explain how to make other kinds of customizations to your windows.

The Window Manager ( Metacity)
The X Window System is the underlying set of processes that allow your workstation to create and work with windows, but when you work with your windows (e.g., resize them, switch from one to another, etc.) you don't actually interact directly with the X Window System. Instead, you interact with a process called a window manager, which interprets your input (e.g., mouse actions, typed commands) and issues commands to the X server based on it. The window manager lets you shuffle, move, and resize the windows on your screen, and also creates the various elements that get associated with each window, such as title bars and edges.

There are several different window managers available on Athena to run in conjunction with the X Window System, reflecting different styles of interacting with windows. At Athena, the window manager used by default is the GNOME based metacity window manager. When you login, the login process automatically starts up metacity for you.

You issue commands (among other ways) from the mouse with various mouse-button point, click, and drag combinations. The following list describes some of the basic window management actions in metacity.

Move a Window: To move a window, click on the title bar with the left mouse button. When you execute this command and move the mouse, the active window will move with the cursor. Move the window to a new location by dragging the mouse; when you release the mouse button, the window will stay in its new location. The window will also be raised to the top of the stack of windows on the screen when you move it.

Resize a Window: First, position the mouse cursor along the edge of the window you want to resize. The mouse cursor will turn into an arrow when you are in the correct position. Click (with the left button) and drag the mouse until the window is the desired size. The edge of the window will appear as a outline as you drag it. Once you release the mouse button, the window will resize itself to the desired dimensions. If the mouse pointer started near the middle of a side, that side will move in or out. If the mouse pointer started out near a corner, that corner will move. Notice that in the center of your screen, a small box displays the window's width and height (for xterms, it shows columns by lines, such as "80x24"). As you change the size of the window, the numbers in the box change accordingly. Release the button when the window is the size you want.

Note: After you resize a window, most programs you run in that window will adjust themselves automatically to accommodate the new window size. Some programs, especially mozilla, may take a few moments to readjust the content of the window to fit its new size.

Iconify a Window: In the upper right corner of every xterm, there are three boxes. One contains a line at the bottom; another, a half-shaded box; and the last an X. To iconify a window, click on the one with the line at the bottom. (The half-shaded box maximizes the window - makes it take up your entire screen; the X destroys the window.) When you iconify a window, it disappears form the screen and the entry for that window in the panel task list has brackets around the name of the program.

Deiconify a Window: Deiconifying a window means restoring the window to its old size and location. To deiconify a window, click once on the name of the window in the task list. The task list is the list of program names on the right side of the panel next to the EXIT sign.

The name of the window is shown in brackets when a window is iconified. When you deiconify a window, the restored window reappears in its old location. and the task list entry will no longer contain the brackets.

Raising a Window: "Raising a window" means bringing a window to the top of a stack of windows. Think of your screen as displaying a stack of windows. Executing this command will bring the active window to the top of the stack. (The active window is the one with the mouse cursor positioned in it when you execute the command.) To do this, click on the title bar of the window.

Lowering a Window: "Lowering a window" means pushing it beneath others. This command pushes the active window to the bottom of the stack, away from you. To do this, click on the title bar of the window with the right mouse button. A menu of options will pop up. Select Lower to shuffle the window to the bottom of the stack.

Working with the Operating System

This section explains some aspects of the Athena system you need to know to use particular programs, particularly aspects related to entering commands and working with the computer interface.

The Operating System
An operating system is a "supervisor" for a computer. It keeps track of what the machine is doing and generally manages the internal workings of the machine. An operating system is what makes it possible for you to enter commands from the keyboard and have the computer respond to them.

The operating system used in all Athena workstations is some member of the UNIX family of operating systems. UNIX was originally developed at Bell Labs, a facility owned by the AT&T Corporation, but the Athena workstations use different descendants of UNIX.

The section of this document on Differences Among Workstations contains a list of what operating systems are currently being run on Athena, and directions on how to find out what operating system your computer is running.

The Shell
Once you are logged in, the commands that you enter at the Athena prompt do not go directly to the operating system for implementation. Instead, they are managed by a special operating system program called the shell. The shell is a "command interpreter". This means that the shell serves as an intermediary between you and the operating system: you type a command name, and the shell interprets what you have entered and submits it to the operating system in a full form; when the program finishes, the shell comes back and asks for the next command (with another athena% prompt).

Having a shell allows you to enter sophisticated commands using shorthand notation, and lets you edit commands and recall previous commands. (The operating system by itself just waits for the final version to be passed to it from the shell.)

On Athena, you can choose from among several shells with different abilities. By default, Athena users automatically use a version of the C shell (typically the tcsh program).

Entering Commands
A full command consists of a command name, followed by zero or more options, followed by zero or more arguments. Individual parts of a command should be separated by spaces. For example:

  athena%  
lpr   -h -Pbias   myfile.PS otherfile.PS
           ---   ---------   ----------------------
            command  options          arguments

Most commands must be entered in all lowercase, and you cannot abbreviate command names.

Though the dividing line between a command option and a command argument can sometimes be a little fuzzy, the general idea is that options are supposed to tell a command how to do what it does, while arguments are meant to tell a command what to do it to.

Command: A "command" is really nothing more than the name of a program. The command part of the above example is the lpr.

Options: Options are the "adjectives and adverbs"; they modify the way that the command works, for example, "Show me all of them instead of just some," or "send it to that printer instead of the usual one." (You may also see options referred to as "arguments," "flags," "qualifiers," and "switches" depending upon the operating system background of the person talking.)

Not all commands have the same options, and many have no options at all, but there are some things you should know about command options:

  • Command options almost always start with a hyphen (" -").
  • A command option can be:
    • a single character ( -u)
    • a single character followed by a word or number ( -o output, or sometimes -ooutput)
    • a whole word ( -draft)
    • a whole word followed by a word or number ( -editor prompter)
  • You can run all the single letter options together first, followed by the options that require values, separated by blanks ( lpr -hf -Pbias is identical to lpr -h -f -Pbias).

The documentation for a command (found by typing man commandname) will describe the options and arguments for the command. The only way to be sure about how a command will interpret the borderline cases of its options is to look at the documentation for that command and experiment. If you make a mistake in the options of a command, the program will usually show you the correct general command syntax.

Arguments: Finally, you list the arguments to the command. Often these will be the names of the files that you want the command to work on. If there is something wrong with the file specification, the system usually replies: " filename not found", or " filename: cannot open", or " filename: no such file or directory".

Examples: The date command can take an option, but does not use any arguments. If you enter date without an option, date displays the local date and time:

  athena% 
date
  Thur Jul  2 21:14:20 EDT 1998

If you include the -u option ( u stands for universal time, or the time in Greenwich, England), date displays the universal date and time:

  athena% 
date -u
  Fri Jul  3 01:14:53 GMT 1998

Some programs are smart enough to let you know what they need if you leave out options or arguments. For example, take zlocate, mentioned in the section on Checking If a User Is Logged On:

  athena% 
zlocate

  usage: zlocate [ -a | -d ] [ -p ] [ -1 ] user ...

Case Sensitivity
UNIX is unusual among operating systems because it is case-sensitive: it does matter whether you type a letter in uppercase (A, B, C, ...) or lowercase (a, b, c, ...). Most things in UNIX are entered in all lowercase. Uppercase is usually used only to make something stand out, or when the lowercase alternative is already taken.

You must train your eye to pay attention to the case of letters and always mimic exactly what you see. If you are having problems, especially with characters that do not echo on the screen, check to see whether Caps Lock is set.

Fixing Typing Errors and Bailing Out
When you see the system prompt, you are logged in and ready to enter commands. However, before you start learning UNIX commands, there are a few key sequences you need to know about to help you get out of trouble.

If you have entered a command that you want to cancel while it is still in progress, try entering Ctrl-c. If once doesn't work, try Ctrl-c several times. Unfortunately, some programs ignore Ctrl-c and refuse to quit; for these programs, try entering q (for quit) or exit and press Return, or enter Return Ctrl-d. As a last resort, you might try Ctrl-z. See the section on useful control characters for how to deal with Ctrl-z.

If all else fails, contact a consultant (but don't turn off the workstation!).

Email on Athena

Athena gives you an electronic mail address; from here, you can send email anywhere in the world. This section talks about getting yourself on and off mailing lists, getting your own mailing list, and what to do when you go away for the summer. You can start a basic mail program by clicking on the envelope icon in the panel.

If you don't know how to send and get mail, refer to the document Electronic Mail on Athena for some of the basics.

Mailing List Types
There are three types of mailing lists at MIT: Athena lists, Mailman lists and LISTSERV lists. Athena lists are provided on request to Athena users for MIT-specific purposes (instructions on how to request a list are provided below). Athena lists can be used for e-mail as well as to create groups to set access permissions for files in AFS. Mailman lists allow more e-mail list features such as moderation and greater control over membership, but do not support creation of AFS groups. For a summary of feature differences between Mailman and Athena lists, see the MIT Mailman User Guide: Athena List Features. LISTSERV lists are slowly being phased out in favor of Mailman lists.

The sections below cover a few basics for using Athena lists.

Adding Yourself to a Mailing List
You can add yourself to any public mailing list. To do so, you can use the blanche command as follows:

  athena% 
blanche 
list -a
username

For instance, if your user name is jruser, and you want to add yourself to the widgetmania list:

  athena% 
blanche widgetmania -a jruser

Alternatively, you can use the mailmaint program; type mailmaint at the Athena prompt. This program has a menu; it is very easy to work with, and much more intuitive than the blanche command. You can also use the new web interface. It requires certificates, but can be used from anywhere you have web access and an MIT personal certificate.

If the mailing list is not public (and/or if the above does not work), you will have to e-mail the administrator of the list and get them to add you. Many lists have a request list as well; for instance, requests for the list "reuse" go to "reuse-request". No matter what method you choose, it will take a few hours for your addition to have effect.

Do not e-mail the list itself; most of the people on the list cannot help you, and you may receive lots of e-mail from upset people.

Removing Yourself From a Mailing List
The blanche command, used as follows:

  athena% 
blanche 
list -d
username

The mailmaint program or the web interface, all of which are described above, will send mail to the list administrators; again, mailing the list itself is not likely to have the desired result. Also, you may wish to check that your name (rather than a list you are on) is on the offending list; mailmaint or the web interface can be used to check this. If all else fails, contact OLC.

To remove yourself from many mailing lists, use the web interface or the listmaint program:

  athena% 
listmaint

This command displays a menu. Select the "query-remove" option to remove yourself from each list you belong to. You are asked to confirm each deletion. Removal from mailing lists (whether one or many) takes a few hours to take effect.

Getting Your Own Mailing List
To get a mailing list, see: Email Lists at MIT.

Forwarding Your Mail
To forward your e-mail for the summer (or for any length of time), use the chpobox -s command, followed by where you want it forwarded. For instance, if you want to forward your mail to jruser@whitehouse.gov:

  athena% 
chpobox -s jruser@whitehouse.gov 

When you come back, you can unforward your mail with the command:

  athena% 
chpobox -p 

Once again, both of these commands take a few hours to take effect.

If you're going away for the summer and don't want your mail forwarded, or if you're going away forever, see What Happens When You Leave (Temporarily or Permanently).

For more options for forwarding your mail, including splitting your mailbox, visit the Forwarding section of Electronic Mail on Athena

Zephyr on Athena

Zephyr is a means of contacting other users who are logged in on Athena. With zephyr, you can send messages to other people who are logged in on Athena, and they can reply with their own messages. Athena also uses zephyr to inform you of relevant changes or problems. This section discusses the basics of zephyr: how to determine if a user is logged in, and how to communicate with that user.

Checking if a User is Logged In
To check if a user is logged in and able to receive zephyrgrams (the messages sent by the Zephyr system), use the zlocate command with their username:

  athena%
 zlocate jruser

If the user is logged in and currently receiving zephyrgrams, this will say where they are currently are logged in. (The first entry is where they currently are; the last is when they logged in.) If they are not logged in, or not receiving zephyrgrams, this will say "Hidden or not logged in".

Sending Zephyrgrams
To send a zephyrgram, use the zwrite command, followed by the username of the person you want to send a zephyrgram to:

  athena% 
zwrite jruser 

and follow the directions.

An example transcript:

  athena% 
zlocate wjclinto

  white-house.mit.edu     :0.0                   Sun Jan  4 19:32:10 1998
  athena% 
zwrite wjclinto
  Type your message now. End with control-D or a dot on a line by itself.
  
hi there.
.
Message queued for wjclinto... sent athena% zlocate mlewinsk Hidden or not logged in athena% zwrite mlewinsk mlewinsk: Not logged in or not subscribing to messages

For more information on these and the many other features of zephyr, see Zephyr on Athena .

The World Wide Web

This section covers the basics of starting a web browser on Athena, how you can prove you are who you say you are on the web, and how sites can prove they are who they say they are.

Mozilla Firefox
Mozilla Firefox is the default browser on Athena. To use it, click on the firefox icon in the panel at the bottom of your screen.

When your home directory is over quota, Mozilla Firefox will often claim your certificates are invalid when this is not the case. If you find yourself having this problem, consult Getting Below Quota for how to get yourself below quota.

Certificates
Certificates are your key to secure web services at MIT, such as WebSIS. A certificate guarantees to the site receiving it that you are who you say you are; the site can have a certificate as well, which proves that it is who it says it is. As such, they are used in many situations where it is important to definitely know the identity of that with which you are communicating, such as ordering items online and registering for classes at MIT.

For more information on certificates and to obtain the MIT Site and Personal Certificates you will need to access web services at MIT, see: Certificates at MIT

Protecting Your Account

Over time, you will come to store many files in your Athena account. In addition, you can use your Athena account to access many files and locations not available to everyone on the Internet. A person acting maliciously can masquerade as you and cause damage which you would be responsible for. This section details methods of preventing others from accessing your account and your privileges.

Keeping Your Files Safe
Athena machines are not completely private and secure. There are, however, steps you can take to make access to your files very difficult and ensure that your files will not be destroyed. All users, from the beginner to the most advanced, should take these simple precautions:

  • Do not store personal or sensitive information (i.e., any information that must be kept secret) on Athena.
  • Never lend your account to another person (e.g., by telling anyone your password, or leaving someone logged into your account).
  • Keep your password secret. Never tell it to anyone, not even someone claiming to work for MIT; there is no legitimate reason for someone to ask you for it.
  • Do not change the default file protection without reason. The present default file protection on Athena prevents the casual browser from gaining access to your files; it is set so that anyone can list the names of the files in your top-level directory by default, but no one except you can read and write them. If you want to allow other users to read your files, you can change your default file protection or make use of your ~/Public and ~/Private directories. See Sharing Files for more information on file protections and how to change them.
  • Do not leave your workstation unattended while you are logged in. If you are going further than to pick up printer output, either log out, or use a protective program such as xss. It only takes a couple of seconds for somebody to compromise your account.
  • Keep backup copies of critical files, such as your thesis.

Choosing a Password

Your password should be something that you will remember, but that cannot be easily guessed by others. Here are some points to keep in mind when choosing a password:

Do choose:

  • At least 6 characters, preferably a mix of alphabetical and numeric characters and punctuation that's easy to remember, but hard for someone else to guess.
  • A mixture of upper- and lowercase; passwords are case sensitive.
  • Something obscure; for instance, you might deliberately misspell a term or use an odd character in an otherwise familiar term, such as phnybon instead of funnybone.
  • An acronym for your favorite saying, e.g., GykoR-66 for "Get your kicks on Route 66."

Don't choose:

  • Your real name in any form (first, middle, last, maiden, spelled backward, nickname, initials, etc.).
  • Your username, part of your username, or your username spelled backward.
  • Any common name, name of a close relative, friend, or pet, or name from popular culture, e.g., spock.
  • Any significant numbers: phone, office, social security, license plate, address, birthday, anniversary, etc.
  • Any word in any dictionary.
  • A password made up entirely of digits.

Changing Your Password

Remember that your password is the key to your account and access to the system. Once someone has your password, that user is you on the system.

It is a good idea to change your password regularly (at least once a semester is a good rule of thumb). To change your password, type:

  athena% 
passwd

The program asks you for your old password, then has you type in the new password twice. Neither your old password nor your new one appears on the screen as you type it.

Your new password takes effect immediately. However, any programs you started before you changed your password, such as xss, will continue to use the old password until you restart the programs or log in using the new password.

If after typing passwd, you decide not to change your password, you can exit and keep your old password by pressing Ctrl-c.

You can also change your password on the web at Change Your Kerberos Password.

If you have forgotten your password, or get the message "Login failed" when you try to login and type your password correctly, you can go to the Athena User Accounts office (first floor, N42; x3-1325; accounts@mit.edu) during office hours to resolve the problem. Please remember to bring some form of photo ID.

Working Within Your Quota

Your disk quota is the limit on the amount of space on Athena you can use to store your files and the number of files you can have. As of February 5, 2008, You initially have a limit of 1.5 gigabytes (1.5 Gb, or 1.5 Gigs). As you accumulate mail, papers, and other files in your directory, you may approach this limit. If you reach your limit, you are not able to incorporate mail or save files.

Checking Quota
To check your quota, use the quota -v command:

  athena% 
quota -v
  Disk quotas for mariavt (uid 4863):
  Filesystem    Type  ID    usage   quota    limit    files  quota  limit
  /mit/mariavt  volume      184768  1500000  1500000  

This shows the disk usage and limits on attached lockers you maintain (i.e., attached volumes to which you have write access).

The quota -v command returns:

  • name of the filesystem
  • type of filesystem (always volume for AFS lockers)
  • usage (how much disk space is being used)
  • quota (how much disk space is allotted)
  • limit (same as quota, here)
  • other column headings in the output (not relevant here)
  • a warning if you are using more than 90% of your quota

To find the quota for a specific locker (which must be attached), use the -f option with the filesystem path, as in:

  
quota -v -f /mit/
lockername

For example:

  athena% 
quota -v -f /mit/sipb

  Disk quotas for mariavt (uid 4863):
  Filesystem      Type  ID   usage  quota  limit  files  quota  limit
  /mit/sipb       volume           159940 166000 166000<<
  
  96% of the disk quota on /mit/sipb has been used.

If you give someone write access in a directory in your locker, any files they create there count toward your quota.

If your usage is over or approaching your quota, you need to take action to avoid losing any files. See Getting Below Quota for tips on cleaning up your files.

Exceeding Quota
You can tell that you have used up your limit of disk space if you see a message like one of the following:

  /afs/athena/user/
u/
s/
username disc quota exceeded
  Over disc quota on /mit/
username

You'll notice that you can't create any more files or use any more disk space. To find your current usage and limits, type quota -v.

Do not ignore the warning message, or any mysterious file disappearances. If you do, you risk losing the contents of any file that you try to edit.

Other symptoms of being over quota include the following:

  • When Using Emacs: If you attempt to save an Emacs file that would put you over your quota, you can save it. However, once you are over quota, you cannot save any more files.

    In your Emacs minibuffer, you receive a message of the form:
    Opening output file: disc quota exceeded, 
    filename
    
    Try to delete any unnecessary files (see Getting Below Quota).
  • When Sending Mail: If there is not enough space to create your draft message, comp exits with this error:
    comp: unable to create
      /afs/athena/user/
    u/
    s/
    username/Mail/draft: Disc quota exceeded
    
  • When Incorporating Mail: If there is not enough space for inc to incorporate your mail, it gives you a message like the following:
      inc: unable to write 131: Disc quota exceeded
    
    inc copies as many of your new messages as it can to your directory, but leaves the original versions of all your messages on your post office so that you can "re-inc" it when you have made enough space available. You can find more information on this in the Electronic Mail on Athena document.
  • When Using cp to Copy Files: cp does not give you an error if you try to copy a file that would put you over your quota; it will copy the file. However, if you are already over quota, it gives an error like this:
    cp: 
    filename: Disc quota exceeded
    
  • When Using Mozilla: If you attempt to use your certificates while you are using Mozilla, and you are over quota, it will sometimes claim that your certificates are not valid. You will need to get below quota in order to use your certificates correctly; see Getting Below Quota for more information on how to do this.
  • When Using Other Programs: Not all programs give you messages if they are unable to finish writing successfully. If you are using a program that generates an output file, you should check your quota first to make sure that you have room for it, and check the output file as well to ensure that it has saved correctly.

Getting Below Quota
There are several things that you can do to get below your quota:

  1. Remove unnecessary files. When you get a warning, the first thing you should do is look around your directory for unneeded files. Delete and purge them; see the section on Deleting Files for more information on how to do this.

    The program helpquota in the consult locker will help you figure out what files are taking up up all your quota. It will also and help you find and remove expendable files. To run it:
    athena% 
    add consult
    athena% 
    helpquota
    
    The following files are often expendable:
    Filename
    Description
    file~ an older version of the file
    file.o object files created when you compile a program, which will be recreated when you recompile the program
    file.err
    file.otl
    file.aux
    files generated by LaTeX (usually), which can be re-created by processing the source file again
    file.dvi
    file.PS
    usually files made with LaTeX, which can be recreated if you have the corresponding file.tex around (NOTE: files ending in .dvi or .PS may not have necessarily been generated by LaTeX; other software creates .dvi and .PS files as well; make sure that you have the source file that generated the file before you remove it)
    core files that may have been created when you were running a program that failed with the message "Segmentation fault (core dumped)" or "Bus Error (core dumped)" (core files are useful for finding out what caused the program to fail, but little else)
    capture.rgb
    capture.mv
    capture.aifc
    files (still camera pictures, movies, and audio files, respectively) take up a very large amount of room and are often unneeded or forgotten
    .netscape/cache/*
    .netscape/history.db
    .netscape/history.list
    history of all web pages you have visited with Netscape; the cache directory contains copies of all of these pages; often huge, and Netscape can function without them
  2. Once you've removed your unneeded files, you can use the quota -v command again to see whether you are still over your quota.
  3. Clean up deleted mail and files. rmm (a command to remove a mail message) automatically uses delete to get rid of the mail file. To clean up rmm'ed mail, you can just do:
      athena% 
    expunge -r ~/Mail
    
    This forces the removal. Also, remove files that have been deleted with the delete command using expunge or purge; see Removing a File (delete and rm) for more information on these commands.
  4. Back up. Next, burn to a CD or copy to a removable drive any files that you'd like to keep but don't need to keep on-line. Once you have successfully backed up a file, you can delete the file from your account.
  5. Compress files. Compress any files that you want to keep on-line, but don't access every day. You can compress a file by typing:
      
    compress 
    filename
    This compresses the file, and renames it filename.Z. For more information about compress, type:
      athena% 
    man compress
    
    Note: You cannot use the compress command directly if you are already over quota. Instead, move the file to a temporary directory, compress it there, then replace the original with the compressed version. For example, to do this with a file called bigfile, type:
      athena% 
    mv bigfile /var/tmp
      athena% 
    compress /var/tmp/bigfile
      athena% 
    mv /var/tmp/bigfile.Z .
    
    (The last character is a period, .).

    Pay attention to any error messages you might get. Since the file is temporarily outside your home directory, if anything happens to it you might lose it.

    When you have more space, you can uncompress the file:
      athena% 
    uncompress bigfile.Z
    
    Or you can read it without uncompressing by using the zcat command:
      athena% 
    zcat bigfile.Z
    
    Since a compressed file is usually a large file, you probably want to run zcat through more so you can read the file one page at a time:
      athena% 
    zcat bigfile.Z | more
    

Getting a Quota Increase
If you still find you need more space, first confirm that you have deleted (and purged) all the files you don't need and have compressed (or saved elsewhere) files you want to keep. Then, if you still need more quota, particularly if you are working on your thesis, call Athena User Accounts (x3-1325), or send electronic mail to accounts@mit.edu. Be sure to include:

  • your username;
  • an estimate of how much more space you need;
  • the reason you need more space;
  • approximately how long you will need the additional space.

Working with Files

All information on Athena is stored in files that are organized into directories. A file is simply a bunch of data associated with a name (the filename). Most of the things you do on Athena affect files or their contents. Papers, programs, and mail messages are all stored in files. If you are going to use the Athena system to do any substantial work, you are going to create and manipulate files.

There are two main kinds of files:

  • Simple files are usually text files or binary files. If you write a paper, the file contains plain text; if you write a C program, the file contains C language commands (which are plain text, too). If you compile a program, the compiler creates a file containing binary code. You usually use a text editor such as Emacs or EZ to create and edit simple text files.
  • Directories provide a means of organizing files into meaningful groups. When you log in, you are placed in your home directory, which contains all your files. If you plan to write a bunch of papers during the term, you may want to keep them together in a directory in your home directory called Papers. If you're into programming, you may want to store your programs in a directory called Programs, and within that directory, store the C programs in a subdirectory called C_progs and the FORTRAN programs in a subdirectory called F_progs.

Mastering the basics of the operating system means learning how to create and manipulate files (and knowing how to get out of anything you may get into). This section explains how to manipulate files. A later section, Working with Directories, explains how to maneuver around directories.

File Names
Directory and filenames can be up to 256 characters in length. You can use any character on the keyboard in a filename except a slash (/), but it is best to stick to a-z, A-Z, 0-9, the period or "dot" (.), and the underscore (_). If you use any other characters, you may be setting yourself up for serious trouble. Case matters in filenames: myfile is a different file from Myfile.

File Naming Conventions
Filenames often have extensions. For example, in a file named foo.txt, the ".txt" is the extension. Files have extensions for two reasons:

  • An extension tells people something about a file.
  • Some programs require that the files they deal with have a certain extension; programming language compilers, for instance, require that language source files have proper extensions; .c for C, and so forth.

Some file names start with a . (dot), e.g., .cshrc or .startup.X. The only significance to this is that these files do not normally show up when you ask for a list of your files. Background, utility, and "start up" files, among others, are typically named this way, so you do not usually have to see them in file listings.

Some common extensions you may encounter:

  • .c is a C file (a program written in C).
  • .cc (or .C) is a C++ file.
  • .o is an object file, generated by compiling code.
  • .txt is a text file.
  • .tex is a LaTeX file.
  • .dvi is a file generated by LaTeX, which contains the formatted document. (.log and .aux files are also generated by LaTeX.)
  • .ps (or .PS) is a PostScript file.
  • .fm is often a FrameMaker file.
  • .html (or .htm) is a file written in HTML.
  • .gif and .jpg files contain images.

Wildcards: * and ?
The system provides a mechanism called wildcard characters which lets you refer to more than one file at once.

* is one of the two most commonly used wildcard characters. It matches all files except those whose names begin with . (a period), or any number of characters within a filename. For example, *.f means "all filenames with a .f extension"; h.f and verylongfilename.f would both match. a* means "all filenames that begin with a;" a and anotherfilename.c would both match.

The other is ?, which matches single characters. ?.f means "all one-character filenames with a .f extension;" a.f would match, but ab.f would not.

Testing Wildcards with echo
One way to test out a file/directory list before you use it in an actual command is to use the echo command to find out what the system thinks you mean by a particular specification:

athena% 
echo 
specification

The echo command simply types out its arguments. When it is run, all wildcards are expanded into full filenames if any matching files exist. The actual files themselves are not touched.

For instance, suppose these were the contents of a directory:

athena% 
ls
  Cold   Hot   temps   temps.old

If you wanted to remove the old version of the temps file (temps.old) using an abbreviated form, you could first test your file specification using the echo command:

athena% 
echo *old
  Cold   temps.old

Here you would find that your directory specification did not match what you intended. You could try again with a more precise specification:

athena% 
echo *.old
  temps.old

Now that you have confirmed that the specification refers to the files you want, you can use that specification in the actual command (such as delete) that you intended to use with confidence that the files referred to are the appropriate ones!

In practice, file specifications are a tricky business, and using echo to try them out before really using them is always a good idea.

Creating a File
There are many ways to create a file. The usual way to do so is with a text editor such as Emacs. See the document Emacs on Athena for more information.

You can also take the output of any command and create a new file from it. For example, the scan command shows you what electronic mail messages you have:

athena%  
scan
  102   2/10   wjclinto@mit.edu  Hi, dear. << Now that Kennet
  104   2/10   mlewinsk@mit.edu  Re: Hi, dear. << Actually, I
  105   2/10   wjclinto@mit.edu  Re: Hi, dear. << Don't *lie* 
  109   2/12   kstarr@mit.edu    Subpoena << Hello, Ms. Lewin

When you enter this command, the output from the command is displayed on the screen. If you wanted to save what you were seeing on the screen in a file, you could redirect the output of the command into a file:

 athena%  
scan > mymail
  athena%  
ls
  Mail         Private      README.mail  welcome
  OldFiles     Public       mymail

The > in the command line is the redirection mechanism. It tells the scan command to redirect its output somewhere other than the screen (in this case, into mymail). Be sure the arrow is pointing the right way. It is all right to have a blank between the > and the filename.

If you want to send the output from a command to both your screen and a file, you can use the tee command:

athena% 
 command  |  tee 
filename

This lets the command send output to the screen as usual, but captures a copy of the output and sends it into the specified file as well. For example:

athena% 
scan  |  tee mymail2
  102   2/10   wjclinto@mit.edu  Hi, dear. << Now that Kennet
  104   2/10   mlewinsk@mit.edu  Re: Hi, dear. << Actually, I
  105   2/10   wjclinto@mit.edu  Re: Hi, dear. << Don't *lie* 
  109   2/12   kstarr@mit.edu    Subpoena << Hello, Ms. Lewin
  athena%  
ls

  Mail         Private      README.mail  mymail2
  OldFiles     Public       mymail       welcome

Creating and Displaying Files with the cat Command
The cat (for "concatenate") command displays the contents of a file on the screen. Its command format is:

cat 
filename

For example:

athena% 
cat  ~/.environment
  attach sipb
  attach games

The contents of the file are shown on the screen. If the file is very long, its contents will scroll past you faster than you can read them. You can type Ctrl-s to stop the screen from scrolling, and Ctrl-q to resume scrolling. To cancel a cat command and stop its output, type Ctrl-c.

Note: The workstation may print out garbage and beep a lot after you ask it to cat certain files. This is because some kinds of files are unprintable; they contain data in a format that cannot be displayed on the screen. Binary files are not printable; neither are directory files (the ones ls -F shows with a / suffix).

Also, a quick way to create a small file is by using the cat command to send text you type at the keyboard directly into a file. To do this, you use the > character to direct the output of the cat command into a file. (If you leave off the > character and the filename, cat will just echo your input to the terminal and create no new files.)

With this method, you just type the contents of the file at the keyboard. You can fix typing mistakes in the current line by deleting them; you can erase the current line by typing Ctrl-u, but you cannot change previous lines. When you are done, you finish the last line with a Return and then type Ctrl-d (it is displayed as ^D). For example:

athena% 
cat > README
  
The files in this directory are my C programs for 1.00.
The files marked .c are the source code, and the file
marked a.out is the latest compiled program.

Jo User, 1991
^D
athena%

To fix any mistakes in this file, you can delete it and re-enter the whole thing, or use a text editor such as Emacs. You can also add text at the end of an existing file by using the >> character instead of >:

athena% 
cat >> README
  
almost forgot -- remember to rename a.out
to something else before compiling again!
^D
athena%

>> is another redirection mechanism. It differs from > in that it appends the text that follows it to the end of any existing file, while > would attempt to replace the file with the text that followed it.

Displaying Files With the more Command
The more command is another way of looking at a file. It displays a file's contents one screen at a time, pausing after every screenful so that you can read each screen. To look at a file with more, type:

more 
filename

Once more has filled up the screen, you must give it a subcommand to tell it to continue. There are many such subcommands. Here are the most commonly used ones:

Command
Action

Spacebar

move forward one screenful

Return

move forward one line

b

move back one screenful

/ string Return

search forward for string

q or Ctrl-c

quit

?

help

more is clever enough not to display binary files and directories.

The more command is a filter program, that is, other operating system commands filter their output through more: instead of giving you their output directly, these commands send the output through more so that it will be easy to read and under your control. This is often said as "they pipe their output through more." For example, the man command (which displays online documentation) does this.

You, too, can "pipe things through more." Whenever you enter a command and its output is too large to fit on one screen, cancel it by typing Ctrl-c and re-enter it like this:

athena% 
 command  |  more

The " |" is the pipe character. For example, if you have collected hundreds of files, you can pipe the output of ls through more by typing ls | more.

Type man more at your Athena prompt to learn more about more.

Copying a File (cp)
To make a copy tofile of an existing file fromfile, use the cp command:

cp 
fromfile 
tofile

If cp copies the file successfully, it returns you to the Athena prompt. At this point, two identical copies of the file exist. The file specifications can be relative names or full pathnames. For example, to make a copy of a file named PARTY in your home directory and put the copy into an existing subdirectory Public, you could type:

athena%  
cp PARTY Public/PARTY

Be careful: if a tofile file already exists with the name you specify, cp overwrites the file without asking you. To avoid this problem, use cp with the -i switch; in this case, the system asks you whether you really want to overwrite the existing file before it tries to copy. The original fromfile is not affected by the cp operation in any case.

Moving or Renaming a File (mv)
To move or rename a file, use the mv command:

mv 
fromfile 
tofile

The system renames fromfile as tofile, in effect moving it from one location to another (unlike the cp command, there is still only one version of the file when you use mv). The file specifications can be relative names or full pathnames. For example, to move a file PARTY.LIST in your home directory into an existing subdirectory Private, you could type:

athena% 
mv PARTY.LIST Private/PARTY.LIST

Like cp, if a tofile file already exists with the name you specify, mv overwrites the file without asking you. To avoid this problem, use mv with the -i switch -- in this case, the system asks you whether you really want to overwrite the existing file.

Whether or not mv renames the file successfully, it returns you to the Athena prompt.

Listing the Files in a Directory (ls)
The ls command lists a directory's contents. Suppose you are in your home directory. If you are a new Athena user, ls might return something like the following:

athena% 
ls
  Mail   OldFiles   Private   Public   README.mail   welcome   www

(Actually, the directory contains other files, but ls does not show the others because they are "dotfiles", files with names that are prefixed with a period.)

If you have had an Athena account for a while, you no doubt have other files and directories in your home directory, which would be listed by ls.

The ls command by itself lists just the filenames, alphabetically (A-Z before a-z) in as many columns as will fit across the screen. The ls command has many options. To see them all, use the man command to look at the online manual page for ls by typing man ls. This section discusses some of the more useful ones.

To get a list of all of the files in a directory, including those whose names begin with a . (dot) character, use the -a option (for "all"):

athena%  
ls -a
  .     .cshrc    .mh_profile OldFiles   Public       welcome
  ..    .login    Mail         Private    README.mail  www

The file . always refers to the current directory, in this case your home directory /afs/athena.mit.edu/user/ first-letter/ second-letter/ username. The file .. always refers to the current directory's parent directory, in this case your home directory's parent /afs/athena.mit.edu/user/ first-letter/ second-letter. (See the section Working with Directories for more information about what these directory pathnames signify.)

To get a list of your files that shows more information about them, type ls -l:

athena% 
ls -l
  total 2
  drwx------  2 jruser     2048 Aug 18 17:00 Mail
  drwx------  2 jruser     2048 Aug 18 17:00 OldFiles
  drwx------  2 jruser     2048 Aug 18 17:00 Private
  drwx------  2 jruser     2048 Aug 18 17:00 Public
  -rw-r--r--  1 jruser      433 Aug 18 17:00 README.mail
  -rw-r--r--  1 jruser     1915 Aug 18 17:01 welcome

The following table summarizes the parts of the ls -l output.

Element
Example
Definition

mode

-rw-r--r--

file's access permission modes -- see About File Mode Bits.

links

1

number of links the file has (for directories, this is how many subdirectories exist "beneath" the file, which is always at least two: itself and its parent).

owner

jruser

username of the user who owns the file (in most cases, your username).

size

1915

size of file in bytes (for text files, equals number of characters in file).

modify-time

Aug 18 17:00

date and time when file was last modified (if file has never been modified, date file was created).

name

welcome

actual filename.

There are different types of files: simple files (text files, binary files, or shell scripts), and directory files. Often you need to know the type of the files you are listing. The -F option shows this information (this example shows a directory of someone who's used Athena for a while):

athena% 
ls -F

  README   a.out*   decmipsbin/   myfortpgm.f   src/   sun4bin/

Notice the suffix characters (/ and *) following some of the filenames. These characters are not part of the filename, but give information about the type of file:

Suffix
Meaning

(none)

regular file

/

directory

*

executable binary file or a shell script

@

symbolic link to another file

As with many commands, you can combine ls options to use more than one at the same time. For example, to get a long listing of all the files in a directory, type ls -la.

Removing a File (delete and rm)
It is a good idea to delete files that you no longer need. This can help keep your directories from becoming too cluttered, and keep you from exceeding your allotted disk quota.

On Athena, there are two ways to get rid of unwanted files: delete and rm (remove). The delete command differs from the rm command in that delete is not necessarily permanent. When you use rm to remove a file, the file is erased from the system immediately and permanently; when you use delete to remove a file, the file is removed in such a way that you can recover the file (within about three days) before it is permanently eliminated from the system.

Completely erasing the file from the system is usually what you want, but once in a while you may accidently remove a file you wanted to keep -- the manuscript for a paper that's due the next morning, for example, or part of your thesis! Because of this possibility, it is a good idea to use only the delete command; this helps you avoid mistakenly losing any files.

Using Delete and Related Commands
The commands that let you delete, recover, or remove files are summarized in the following table. (For more information about each command, including command-line switches, see the online man pages; for example, type man delete for details about the delete command.)

Command
Function

delete

Mark one or more files for permanent removal, making them invisible to the user (by renaming them with the prefix .#) but not actually erasing them from the system (use expunge or purge to permanently erase files marked for deletion).

undelete

Restore files marked for removal from current directory by delete (if not already expunged).

lsdel

List files marked for removal but not yet expunged.

expunge

Permanently remove specific files marked for removal.

purge

Permanently remove every file marked for removal in user's home directory and all subdirectories.

If you accidentally delete a file and then realize that you want it back, you can get it back by using undelete.

Because of the way delete works, deleting files does not actually lower the amount of quota you are using (each file is simply renamed to a form that is invisible to your normal work, specifically from filename to .#filename). To lower your used quota, you must fully remove the deleted files from your system by using the purge or expunge commands.

For example, suppose you have a directory containing the following files:

advisor   notes   thesis.tex   thesis.tex~

Because you are near your quota, you decide to remove the old version of your manuscript file (the one ending with ~) to create some room. However, you accidentally leave off the ~ from your command and thereby remove the newer version of the file from the directory:

athena% 
delete thesis.tex
  athena% 
ls
  advisor   notes   thesis.tex~

If you had used rm to do this, you would not be able to recover the lost file, and would instead have to salvage what you could from the older file. However, because you used delete instead of rm, you can recover the deleted file by using undelete:

athena% 
lsdel

  thesis.tex
  athena% 
undelete thesis.tex
  athena% 
ls
  advisor   notes   thesis.tex   thesis.tex~

You can now remove the appropriate file, and even permanently eliminate it once you verify that you have marked the correct file for removal:

athena% 
delete thesis.tex~

  athena% 
ls
  advisor   notes   thesis.tex
  athena% 
lsdel
  thesis.tex~
  athena% 
expunge thesis.tex~
  athena% 
lsdel
  athena% 
ls

  advisor   notes   thesis.tex

Note that the undelete command only retrieves files removed with the delete command -- it cannot retrieve files eliminated by rm. In addition, you cannot retrieve a deleted file that has been removed by purge or expunge. That is, you cannot undelete a file once it has been purged. (Now, under AFS, this may not be the end of the story, you may have one last chance: see Using ~/OldFiles For File Restoration for details. However, you will not get back any changes you made in the last day or two, and relying on this method is not a good idea.)

You can set up your system so that delete (rather than rm or rmdir) is automatically used whenever you want to remove files. Just put the following lines in the .cshrc.mine file in your home directory (which you can create if it does not exist):

alias rm delete -F
  alias rmdir delete -D

Then when you type rm to get rid of a file or rmdir to get rid of a directory, delete is actually used.

Using the rm Command
The delete package is Athena-specific. The standard UNIX utility for removing files is rm, and it exists on Athena in addition to delete. (Athena recommends that you use delete rather than rm, since files that you rm accidentally usually cannot be recovered.)

To remove a file using the rm command, just type a command of the form:

rm 
filename

The rm command does not verify the deletion; it simply returns you to the athena% prompt. Because rm removes files permanently without confirmation, it is a very good idea to use the -i option with rm. The -i option stands for interactive; with this option, rm asks you to confirm the deletion you are performing.

Before you rm something, remember the old Unix adage: " rm is forever."

Working with Directories

Every file on Athena (and elsewhere) is located in a directory. Directories keep files organized; through directories, you can find your files, as well as other files you are interested in. This section explains directories on Athena, how to create and remove directories, how to change from one directory to another, and other commands relevant to directories.


Directories, Pathnames, and the File System

The file system is a set of many files organized into a tree of directories and subdirectories. Every directory and every file has a pathname that specifies its location within the file system tree. Everybody's files are somewhere in this tree, occupying some sub-branch: the system's files, your files, other users' files, and the online documentation files all are stored in this tree.

The path to a file or directory is usually listed from top-most directory down, with intermediate directories separated by slashes. For instance, when you log into an Athena workstation, the system puts you into your home directory. (Your home directory, and all the subdirectories beneath it, constitute your locker.) Your home directory is located in the overall directory tree as:

/afs/athena.mit.edu/user/
first-letter/
second-letter/
username

Here, username is the name you enter when you login, first-letter is the first letter of your username, and second-letter is the second letter of your username. For instance, if your username were jruser, your home directory would have the following pathname:

/afs/athena.mit.edu/user/j/r/jruser

This means that someone starting at the root of the directory tree would have to go down into the directory tree through the following directories to get to your home directory:

  • the root directory (indicated as the first slash / );
  • the directory afs, which holds the subdirectories for many different sites around the world;
  • the directory athena.mit.edu, which holds subdirectories at MIT related to Athena (for example, courseware and development lockers are held in subdirectories of athena.mit.edu);
  • the directory user, which holds all the directories for individual user accounts on Athena;
  • the directory j, which holds all the directories belonging to users whose usernames start with the letter "j";
  • the directory r, which holds all the directories belonging to users whose usernames start with the letter "j" and whose second letter is "r" (i.e., only usernames that start "jr");
  • the directory jruser, which is the user's home directory itself (note that the name of your home directory is your username).

You can find out the full pathname of your own home directory by typing printenv HOME at your athena% prompt.

Because the full pathname is rather long, Athena lets you specify your home directory in an alternative shorthand as follows:

/mit/
username

The home directory is still in its original location, but there is a link in the /mit directory that lets you get to the home directory through the shorter path.

About AFS Cells and Volumes
A file system organizes the files and directories on a computer system. AFS's file structure and hierarchy depend on cells and volumes.

  • An AFS cell is a collection of filespace managed by some administrative domain (e.g., a company, a university department, or any defined group of users.) There are AFS cells in many different cities, states, and countries, and each cell can have files and volumes on many different file servers. Athena's AFS cell consists of all the directories under /afs/athena.mit.edu (also known as /afs/athena, thanks to a symbolic link). Another AFS cell at MIT of interest to Athena users is /afs/sipb.mit.edu, which contains files maintained by SIPB.
  • An AFS volume is part of a cell, and is usually (but not always) the same thing as a locker in the Athena system. For example, your home directory (including all its subdirectories) is both an Athena locker and an AFS volume.

Beneath the /afs/athena.mit.edu directory, the local lockers are organized according to type. Thus, all Athena lockers have pathnames such as:

/afs/athena/
type/.../
lockername

Since all AFS lockers appear under the /afs tree, you can use the cd and ls commands to browse through the Athena cell and see what volumes of each type interest you. However, be sure to attach the locker when you want to use the contents of a volume (see the section on the attach command).

Here are all the Athena locker types:

athena% 
ls /afs/athena.mit.edu
  activity   contrib    dept       project    service    system
  astaff     course     org        reference  software   user

Using the attach Command
You can use the /afs/athena.mit.edu hierarchy to browse through directories to see what lockers are available, but you should attach lockers when you want to use their contents, instead of using explicit AFS pathnames.

To access a locker, use the attach command as follows:

attach 
lockername

The attach command does the following (these steps are done, for example, when your own locker is attached during login):

  • creates a link from the AFS pathname (e.g., /afs/athena.mit.edu/ type/.../ lockername) to /mit/ lockername. To establish and use this link, you don't have to know the locker type or the long AFS pathname; you can use the shorthand /mit/ lockername.
  • obtains AFS tokens to allow you access to the files and directories within the locker. (The Kerberos tickets you receive when you log into Athena allow you to obtain AFS tokens.)
  • subscribes to Zephyr notices for the locker's file server (so you'll get notices if there are problems on that server).

The Working Directory
To identify a file, the system needs to know its exact location (i.e., its given name preceded by the path of directories one must follow to find it). Nevertheless, you do not have to give a file's full name every time you specify it because the system keeps a value for you called the working directory (also known as a "default directory" or "the current directory"). A working directory is, simply, the directory you are currently "in".

From the time you log in to the time you log out, you are in a current working directory. You start out in your home directory (e.g., /afs/athena.mit.edu/user/j/r/jruser, also known as /mit/jruser), because that is where the login process puts you when it lets you use the workstation.

Whenever you specify a simple filename, the system assumes that you are talking about a file in your working directory, and so can locate the file. You can change your working directory at any time. Each of the windows on your screen has its own current working directory.

The system provides a few short-hand synonyms relative to the working directory, which you can use in file and directory commands:

Symbol
Meaning

.

the current working directory

..

the directory above the current working directory

~

your home directory

Finding Out Where You Are ( pwd)
To find out the pathname of your current working directory, use the pwd ( print working directory) command at your athena% prompt.

If you use the command immediately after logging in, the transaction proceeds as follows:

athena% 
pwd

  /afs/athena.mit.edu/user/
first-letter/
second-letter/
username

where username is your username, first-letter is the first letter of your username, and second-letter is the second letter of your username.

As you start hopping around the tree with cd commands (see Changing the Working Directory), it is easy to forget where you are. You can always find out your current working directory with pwd.

Note that the results might seem a little confusing if you go to a directory via a link pathname rather than its full pathname. For example, if you attach the sipb locker, it creates a link in /mit such that you can refer to the directory as /mit/sipb -- however, this pathname is just a convenient alias, not the actual path; the sipb locker is still actually located in the /afs branch of the file system tree. The pwd command returns the real pathname, not the link pathname, with results that might seem a little counterintuitive until you understand that links are not real paths.

Creating a Directory ( mkdir)
Use the mkdir command to create new directories.

For example, suppose you are in your home directory and you want to create a series of directories in which to store your programs. You want a directory called Programs in your home directory. To do this, type:

athena% 
mkdir Programs

in the directory where you want the Programs directory to be (here, your home directory).

Not that you must have appropriate access permission to create new directories under an existing directory; by default, you have this permission in every subdirectory of your home directory, but you may not have this permission in most other locations of the file system tree. Also, even for the directories you create in your own home directory, you will want to make sure the access permissions are set appropriately (e.g., you may not want any other users to be able to list the names of the files in your new subdirectory). For information about how to check and set access permissions, see the section on Sharing Files.

Changing the Working Directory ( cd)
You will often want to temporarily change your working directory from your home directory to somewhere else on the tree. Use the cd (for "change directory") command.

For example, suppose your username is jruser and your current working directory is your home directory. You want to modify some of the files in the subdirectory of your home directory called Private -- you want to "work in" that directory, as the saying goes. You could specify the files of interest by their full pathnames (e.g., /afs/athena.mit.edu/user/j/r/jruser/Private/resume.tex) or you could specify the files by their somewhat simpler but still tedious "relative pathnames" (i.e., pathnames relative to the current working directory, such as Private/resume.tex). However, if you intend to do any serious work in that directory, you probably want to change your working directory from your home directory to Private, then refer to the files by their local names (e.g., resume.tex). To do this, type:

athena% 
cd Private

If you are in a directory other than your home directory, you can use cd without an argument to change the working directory back to your home directory. Thus the cd /mit/jruser command at the end of the previous example could be shortened to just cd:

athena% 
cd
  athena% 
pwd
  /afs/athena.mit.edu/user/j/r/jruser

You may be working in somebody else's directory, somewhere else on the tree. Rather than always typing out /mit/ otheruser, you can just change the working directory to their home directory after attaching their locker:

athena% 
cd /mit/
otheruser

There are several potential oddities to note as you use cd. Any of these of these conditions can produce the illusion that something is seriously wrong with your files or your login session, but in fact some simple explanation lies behind the difficulty:

  • While each user's home directory is always accessible via its full pathname (i.e., under the /afs/athena.mit.edu/user branch of the file tree system), home directories are available under /mit only if they have had a link created under /mit by the attach or add command -- they are not available there by default. This is also true of other lockers you may wish to access. In other words, in the last example above, you would need to attach the other user's directory first before you would be allowed to cd to it under the /mit directory. (See man attach, or our section on attach, for more information.)
  • Even if a directory you want to change to exists (whether under /mit or elsewhere), you may not be allowed to cd to it because you have insufficient access permission to look at that directory. (See the section Sharing Files for detailed information about access permissions.)

Removing a Directory ( rmdir)
If you want to remove a directory, you will want to use the rmdir command. (You could also use the delete command; see Removing a File.)

You cannot remove a directory unless all of the files underneath it are gone. This prevents you from accidentally wiping out important subtrees with one careless command. A quick way to delete all the files in a directory you want to get rid of is to change to that directory with cd, then:

athena% 
delete *

Be careful before you do this! If the directory also has . dot files in it, you must also say:

athena% 
delete .[^.]*

Now you can check what you've deleted with lsdel, then go ahead and expunge if you're certain about the files you're deleting. You can then delete the directory itself. Move out of the directory back to the one above it, then type:

athena% 
rmdir dirname

To prevent accidentally erasing files, the rmdir command only removes empty directories. If a directory isn't empty, rmdir displays an error message. You must then cd to that directory and remove all of its files and subdirectories.

Sample File/Directory Specifications
It takes a little practice to get the knack of correctly entering filenames and directories so that you get the files you want. You could specify all files by their complete pathnames, but that is awfully tedious; also, there are some cases where full pathnames are not what you want (e.g., if you want to enter the same command at different points of the tree, you will want to be able to use relative references to files).

The following table lists some of the common ways to specify directories or files. (All of these have synonyms that would work just as well.) These specifications might be used, for example, in a command of the form cd specification.

To Indicate ...
Use ...

the current working directory

. (a period)

the parent directory of the current working directory (i.e., the directory "above" the current working directory)

.. (two periods)

your home directory

~ (a tilde)

a directory called foo inside your current directory

foo

all the files and directories in directory foo below your current directory

foo/*

a file or directory stuff in the directory foo inside your current directory

foo/stuff

a file or directory stuff in your home directory, when you are in your home directory

stuff

a file or directory stuff in your home directory, when you are in another directory

~/stuff

a file stuff in the directory above you

../stuff

a file stuff in the directory foo in the directory above the one you are in

../foo/stuff

Here's a common mistake: Suppose you wanted to look at the files in your Mail directory and issued the following command:

athena%  
ls /Mail
  /Mail not found (No such file or directory)

This is one manifestation of a common mistake people make when learning about directory specifications. You were trying to list out the files under your Mail directory, but now it seems that your mail files have disappeared.

The problem is the use of the / character. A slash at the beginning of a directory specification means the whole system's root directory. Thus, you did not name your Mail directory, you named a Mail directory immediately under the root directory. This directory does not exist on Athena. (If it did, it would belong to the operating system, and it would be unreadable anyway.)

The rule, then, is to never start a directory specification with / unless you explicitly mean one of the directories immediately below the whole system's root directory, for example: /etc, /mit, and /usr.

Summary of File/Directory Commands

The following commands let you list, examine, create, delete, copy, and rename files and directories.

Command
Function

ls

list contents of directory

cat

catenate and display file(s)

more

display contents of file one screenful at a time

tee

pipe copy of output into file

cp

copy file/directory

mv

move (rename) file

delete

mark file/directory for later permanent removal

expunge

permanently remove files marked for deletion

lsdel

list files marked for deletion

purge

permanently remove files under ~ marked for deletion

undelete

recover files marked for deletion but not yet removed

rm

permanently remove file

pwd

display name of current working directory

cd

change to the specified directory

mkdir

create new directory

rmdir

remove empty directory

echo

displays the typed text, expanding wildcards

For more information on any of these commands, or any others, use a form of the man command at your athena% prompt:

athena% 
man 
command-name | more

Sharing Files

Athena offers several ways to share a file with a friend or colleague without sharing your password. Each method has its pros and cons, so we'll give you the whole story and you can choose which method best suits your needs. This section covers sharing files with other users by transferring copies to them and by setting access permission lists.

Note that the discussion here refers to accounts that are maintained under the AFS filesystem (this includes all user accounts created since 1992 and most Athena lockers).

Transferring Files Between Accounts

There are multiple ways to get a copy of a file to another user without requiring the other user to access the original copy of the file in your own directory. (For example, you might not want the other user to access all the files in that directory.)

Use removable media such as external drives or write able CDs.

Use e-mail. This is useful when the other user is not on Athena, but can only be used for plain text (ASCII). Send it using your normal mail handler, or use the mhmail command:

  
mhmail 
email-address <
filename

For example, to mail the file (share.tex) to the other user (iam@media.mit.edu), type:

  athena% 
mhmail iam@media.mit.edu < share.tex

When sending files by email, it is important to remember that users here and at other sites sometimes have limited space in their mailboxes or restrictions on the size files they can receive. Large files, such as such as MP3s or Office documents larger than a few dozen K, can push users past their mail quota and cause them to stop receiving new messages. It is a good idea to check with the recipient to be sure they can accept the size document you want to send.

Also, this transfer can be accomplished with subdirectories; see Using Subdirectories to Share Files for more information on how to do this.

About Groups
A group is a way to place users together. This is typically used for granting or denying access privileges. For instance, a course could set its locker such that only members of that course could read the contents of the locker. In addition, there are groups owned by the system, called Moira groups. These groups haves names which begin with system:. Users designated as administrators can maintain groups via the listmaint and blanche commands or the web interface. (Mailing lists, for example, may be system-owned Moira groups.)

When you update a group (with listmaint, blanche or the web interface), the change takes effect immediately for AFS purposes such as updating access control lists.

Here are some of the possible group specifications you can make (e.g., as a user-or-group field in an fs command), including several special system-owned groups:

Group
Purpose
 

system:authuser

Any user with valid Kerberos tickets in the same cell (e.g., under athena.mit.edu). For all practical purposes, this is all users at MIT.

system:anyuser

Any user, including AFS users not at MIT.

system:expunge

The process which runs automatically on your fileserver to remove old delete'd files permanently. This group is given ld access to your directories by default, so that the process can look up the old delete'd files and remove them.

system: groupname

A system-owned (Moira) group, whose members can be edited with listmaint, blanche or the web interface. To create a group, contact Athena Accounts. To see if a mailing list is also a group, look at the list information by typing: blanche listname -i.

Note: If you have an account created before 1997, you may also have a group that has the same name as your username (i.e., system:username). Because of the naming confusion between this group and your username, and because these groups were underutilized yet took up system resources, these personal groups are no longer automatically created for new user accounts.

Making Your Files Accessible
In order to give other users access to files in your account, you need to understand how access permissions work. This section discusses:

About Permissions and ACLs

Under AFS, individual files do not have access permissions associated specifically with them; access to a file depends on accessibility of the directory the file lives in. (Thus, for example, a file's rights change if the file is moved to a directory that has different access rights than the source directory.)

You set permissions to access directories (and thus the files in them) in the form of access control lists ( ACLs). The ACL for a given directory is a list of users and groups, paired with their rights.

The owner of a directory (and anyone who has administer rights, as explained below) can set and manipulate the ACLs for the directory with the fs command.

There are seven kinds of access permissions that can be given to users of a directory under AFS. (Note that you can combine these, and give different combinations of permissions to different users.)

Right
Enables users (who have been given that right) to:

r

Read the contents of files in the directory.

l

Look up status information about the files in the directory (i.e., list the filenames in the directory and look at the directory's access control list). This does not imply read access, but if you don't have lookup access, no other form of access (other than administer) can be used.

i

Insert files or subdirectories into the directory (i.e., create new files or move existing files into the directory). This does not imply ability to modify these same files (w).

d

Delete files or subdirectories from the directory.

w

Write or edit the contents of files in the directory. This only allows changing existing files; it does not imply delete (d) or insert (i) access. Write access also gives chmod access to files.

k

Set an advisory loc k on a file. This is used mainly by application programs and not useful to most users; see man flock for more information.

a

Administer or change the rights on the access control list. This does not immediately imply any other kind of access. The owner of a volume always has implicit administer rights. The owner can give administer rights to other users, who can then also change the rights on the ACL. (Thus, be careful about giving administer rights to other users!)

These rights have been aliased into commonly used groups of rights that can be referred to with the following shorthand notation:

Alias
Expands to...
Meaning:

read

rl

read and look-up rights

write

rlidwk

all rights but administer

all

rlidwka

all rights

none

 

used to clear access

Looking at Permissions
To list the ACL for a directory, use the fs la command:

  
fs la [
directory] [
directory ... ]

Directory is the directory you want to see the ACL for, and defaults to the current directory (i.e. .)

This command returns the list of users and groups with their associated rights. (A name with a colon in it is a group. See About Groups for more information.) For example, if members of the Trapp Family Singers had Athena accounts, you might see an ACL like the following:

  athena% 
fs la
  Access list for . is
  Normal rights:
    system:expunge ld
    system:vontrapp rl
    gvtrapp rlidwk
    liesl rl
    mariavt rlidwka

In this example, the following permissions are given for the current directory (indicated by the .):

  • The group system:expunge has ld access by default. (The purpose of this group is described under Groups.)
  • The group system:vontrapp has "read" access, so any user in the vontrapp group has "read" access.
  • The user gvtrapp has "write" access.
  • The user liesl has "read" access.
  • The owner (the user mariavt) has full access (rlidwka).

Setting Permissions
As a directory owner, you can set permission rights for users to access your directories. To assign access rights to a directory, use the fs sa command:

  
fs sa 
directory
user-or-group
rights [
user-or-group
rights ...]
Option
Meaning

directory

the directory you are setting the ACL for (use . for the current directory)

user-or-group

the user (a username) or group (usually specified as system: groupname; see About Groups)

rights

the rights to be given to the preceding user or group, either the explicit rights (from the rlidwka list) or one of the aliases read, write, all, or none

For example, to give "write" (rlidwk) access for the current directory to the user gvtrapp, and "read" (rl) access to the user liesl, you could type:

athena% 
fs sa . gvtrapp write liesl read

To nullify the rights of individual entries, use the term none in the ACL pair:

fs sa 
directory
user-or-group none

This clears the rights of the user or group from being explicitly specified in the directory's ACL. However, this does not necessarily preclude access to the directory--a user could be a member of another group that still has access to the directory, and the user would therefore have access. For example:

athena% 
fs la
  Access list for . is
  Normal rights:
    system:expunge ld
    system:vontrapp rl
    gvtrapp rlidwk
    mariavt rlidwka
  athena% 
fs sa . gvtrapp none
  athena% 
fs la
  Access list for . is
  Normal rights:
    system:expunge ld
    system:vontrapp rl
    mariavt rlidwka

This example removes user gvtrapp's entry (for "write" access) from the ACL for the current directory, but since he presumably is a member of system:vontrapp, he probably still has "read" access to the directory.

The ACL can actually be two lists for a directory: Normal rights give users or groups access to that directory; Negative rights are rights that a user or group explicitly does not have. The Negative rights list always takes precedent over the Normal rights list.

To specify Negative rights, and thus ban a user or group from having those specific rights, use the -negative ( -n) flag in the fs sa command:

  
fs sa 
directory
user-or-group
rights -negative

This prevents the specified user or group from having the specified access to the directory, even if they are explicitly or implicitly (by being a member of another group) given "Normal rights". For example:

  athena% 
fs la Edelweiss

  Access list for Edelweiss is
  Normal rights:
    system:expunge ld
    system:austrians rl
    mariavt rlidwka
  athena% 
fs sa Edelweiss rolf all -n
  athena% 
fs la Edelweiss
  Access list for Edelweiss is
  Normal rights:
    system:expunge ld
    system:austrians rl
    mariavt rlidwka
  Negative rights:
    rolf rlidwka

Now, even though user rolf is a member of system:austrians, he cannot access any of the files in the directory Edelweiss.

Be careful. The group system:anyuser does not require authentication. If you assign Negative rights to a user, but give system:anyuser Normal rights, it's possible for an unauthenticated user to gain access to the directory with system:anyuser's rights. If you use system:authuser instead of system:anyuser, you can avoid this problem.

To nullify Negative rights (i.e., to remove an entry from the Negative rights list), use the term none in the ACL pair, plus the -n flag:

  athena% 
fs la Edelweiss
  Access list for Edelweiss is
  Normal rights:
    system:expunge ld
    system:austrians rl
    mariavt rlidwka
  Negative rights:
    rolf rlidwka
  athena% 
fs sa Edelweiss rolf none -n
  athena% 
fs la Edelweiss
  Access list for Edelweiss is
  Normal rights:
    system:expunge ld
    system:austrians rl
    mariavt rlidwka

To clear all entries from an ACL (i.e., to clear all entries from both the Normal and Negative rights lists) use the flag -clear ( -c):

fs sa 
directory user-or-group rights [
user-or-group
rights ...] -clear

This clears all rights except the ones explicitly set in the command line.

Again, be careful. To keep your own rights to the directory you should include an ACL pair with your rights any time you use the -clear flag, otherwise you, too, can lose access to the directory:

fs sa 
directory
administrator all [
user-or-group
rights ...] -clear

If you inadvertently remove your rights from an ACL, you can restore them from the parent directory, as long as you have all rights there:

athena% 
fs sa Edelweiss mariavt none
  athena% 
fs la Edelweiss
  Access list for Edelweiss is
  Normal rights:
    system:expunge ld
  athena% 
cd Edelweiss
  Edelweiss: No such file or directory
  athena% 
ls -ld Edelweiss

  drwx------  2 mariavt      2048 Jul 16 09:27 Edelweiss
  athena% 
fs sa Edelweiss mariavt all
  athena% 
fs la Edelweiss
  Access list for Edelweiss is
  Normal rights:
    system:expunge ld
    mariavt rlidwka
  athena% 
cd Edelweiss

Using Subdirectories to Share Files

By default, only you can read files in your top-level directory and all your subdirectories. In addition, any Athena user can list the names of the files in your top-level directory.

There are two exceptions: your ~/Public and ~/www directories. If you want to make a file in your home directory readable by anyone, you can move it to the ~/Public directory, where anyone can read it. Use the standard mv (move) or cp (copy) command to move the file to the ~/Public directory. The ~/www directory is readable to all users so that people can access your webpages.

If you want to give specific users certain kinds of access to the files in a directory, you need to edit the ACL for that directory with fs sa. (See Setting Permissions.) You may also want to reorganize your directories so you can group files by who should have access.

New subdirectories inherit the ACL of the parent directory.

If you have a top-level file that needs to stay at the top-level so that programs can find it, and you want to make it readable (without making all the files in your top-level directory readable), you can put the file in your ~/Public directory, then create a link to the file in your top directory, as follows:

athena% 
cd
  athena% 
mv 
filename Public
athena% ln -s Public/
filename
filename

This makes a symbolic link. A symbolic link contains the name of the file to which it is linked. If you read or edit the link, the referenced file is accessed. Links allow you to have files appear in different directories or under different names, while avoiding the complications of making multiple copies. Making multiple copies of the files would take up extra disk space, and would make it possible to edit one copy of the file and leave an obsolete copy in another place.

An example of this is the .tc file used by the calendar program. (This program is in the calendar locker, and automatically creates a .tc file for you if you use the program to enter your schedule.) Many users make this file readable so they can coordinate calendars with other users. You might make the file readable as follows (assuming you already have a ~/.tc file).

athena% 
cd
  athena% 
mv .tc Public

  athena% 
ln -s Public/.tc .tc
  athena% 
ls -l .tc
  lrwxr-xr-x  1 mariavt        8 May 31 23:54 .tc -> Public/.tc

When you delete a link (as you would delete any file), only the link disappears; the referenced file remains in its original location. For more information on symbolic links, see man ln.

About File Mode Bits (rwx)
AFS ACLs are privileges belonging to a user or group, giving permission to read, write, delete, or otherwise access any file in a given directory. In contrast, file mode bits (read (r), write (w), and execute (x)) are properties belonging to an individual file. Under AFS, only the first three (owner) mode bits are relevant, and they apply to anyone who has read or write access to the directory, not just the owner of the directory.

The default Athena setup allows most AFS-based users to ignore the mode bits, because read and write are set for the owner by default when the file is created, allowing users with read and/or write access to the directory to access that file.

In general, it is best to establish accessibility of a specific file in AFS by putting the files in a directory with the ACL you want rather than by toggling the file mode bits of the specific file.

Backing Up and Restoring Files

Throughout your stay at MIT, you will store many files on Athena that are important to you (such as your thesis). Athena automatically backs up your files; there are also many advantages to making your own backups. This section describes how to take advantage of Athena's backups and how to make your own.

The Importance of Backing Up Your Files

On Athena, files are occasionally lost or damaged--you may accidentally destroy the file through misuse of the rm command, for example, or (although it is rare) the fileserver your files are stored on may have a problem. Although Athena regularly clones your personal locker, and backs up all user files to tape, it may not be possible or feasible to restore some files that you permanently delete. It is a good idea to save often and to keep backup copies.

Backing up a file means making a copy of it in a form you can take away with you and store in a safe place (for Athena, you burn floppies or use eexternal disks). Backing up files is a good idea for several reasons:

  • If a file is important, backing it up gives you a copy in case you accidentally remove your original version on Athena. (If you make daily backups of your important files, you only have to worry about losing at most a day's work.)
  • If you need to have immediate access to your files (e.g., your term paper or thesis is due tomorrow), backing them up lets you access them on your local workstation even if there is some temporary problem with the network or your fileserver.
  • If you are developing a large program or document, making and keeping backup copies at important points in the development process can preserve the program or document in known states, which is useful if you need to restore or review earlier versions.
  • Backing up important files regularly is the best way to avoid the extreme anxiety that comes from accidentally removing an important file.

Athena staff will try to restore your files from a backup tape if the disk drive that holds your locker fails, but any files created or modified after the backup tape was made cannot be restored. In addition, it typically takes about eight hours to restore the contents of one disk from tape. If you manage to injure your own files in some way, Athena cannot get them back for you unless they are extremely important, such as your thesis. So, while Athena will do what it can to keep backup copies of your files, it makes sense to have your own backup plan too.

If you are going to back up your files, plan to set up a backup cycle with a rotation of two or more backup sets. If you keep multiple copies of your backups, you'll be covered if you accidentally mangle one of them.

Using ~/OldFiles for File Restoration

Backup volumes are updated to be identical with the regular volume ( cloned) on a regular basis (almost daily, if not daily), and the old copied data is destroyed. You can see a snapshot of your locker (as it was when it was last cloned) in the directory ~/OldFiles. (Since OldFiles is a separate volume, even though it points to the same bits, it does not count against your quota.) Its purpose is to allow you to recover a file if it is mistakenly removed, or to let you undo modifications. Unfortunately, there is no direct way to find out when the backup was created.

Thus, if you deleted a file this morning, and your locker was cloned last night, you should find a copy of yesterday's version of the file in ~/OldFiles. You can't edit it there (because it is a cloned volume, and cloned volumes are read-only), but you can copy it from ~/OldFiles into your normal locker to work on it again. For example:

  athena% 
ls paper1.tex
  paper1.tex: No such file or directory
  athena% 
ls OldFiles/paper1.tex

  OldFiles/paper1.tex
  athena% 
cp OldFiles/paper1.tex .
  athena% 
ls paper1.tex
  paper1.tex

Now you can edit your file in the normal directory.

Note that fs la lists the same ACL for your ~/OldFiles as your ~ directory (as of the time it was cloned). Actually, since the backup is a read-only volume, the ACL is only relevant for "read" rights--whoever has permission to read can do so, but no one can modify files under ~/OldFiles, no matter what permissions are listed in the ACL. If you try to change anything under ~/OldFiles, you get an error message.

Appendix 1: Using Athena Without Logging In

The Other Options button of the Athena login window displays a menu of programs you can run without having to login -- that is, without having to supply your username and password to Athena. You do not even have to have an Athena account to run these options. (Of course, when you run these options, you do not get access to your private Athena filespace.)

These "pre-login" options are divided into two main categories:

  • informational programs useful to the general Athena user community and the MIT community at large;
  • other programs oriented more toward special users such as Athena Operations staff.

The following table lists each option and its function-key form, plus the corresponding Athena program that is run when you select that option. To select an option, click on the Other Options button of the login window and drag the mouse to the appropriate option and release. Alternatively, you can press the key sequence listed.

Menu Option
Key
Associated Athena Program

Map/Status of Athena Clusters (xcluster)

Shift-F2

xcluster

Library Access

Shift-F4

add library; library

Display Workstation Configuration

Shift-F6

/etc/athena/login/machine

Login to MITVMA

Shift-F7

x3270 mitvma.mit.edu

Update MIT Mailhub Info (Moira)

Shift-F8

attach moira; /mit/moira/namespace

Display Console Window

Page Up*

show_console

Shut Down Window System

Ctrl-p

(no direct analogue)

* use Page Down to hide it again.

Appendix 2: What Happens When You Leave (Temporarily or Permanently)

If you have an Athena account, you need to take the action appropriate to your situation when the school year comes to an end, or if you leave MIT:

  • Graduating Seniors, and others who will NOT be returning to MIT in the Fall: Athena will remove your user account (both your username and your locker) after you graduate. (This happens around the next IAP after you graduate.) Therefore, if you want to keep your Athena files, you should take them with you. You also need to remove your username from any mailing lists you happen to be on (see above for how to remove your name from Athena mailing lists).
  • Students who WILL return in the Fall but are NOT staying at MIT during the Summer: You may leave your files on the system, although you may wish to remove your name from any mailing lists you happen to be on to prevent your having a very large amount of mail in the fall. (See above for how to remove your name from Athena mailing lists.) You may also want to save your important files elsewhere.
  • Students who WILL return in the Fall and ARE staying at MIT during the Summer: You don't have to do anything. You may want to back up your important files.
  • Students who are taking time off or otherwise will not be registered: Your account might be deleted. Students who won't be registered should back up all files, and contact Athena User Accounts (x3-1325) to see if arrangements can be made to retain the account. If you will not be registered for classes next term, but will be working formally or informally with an MIT faculty or staff member, you must take special steps to keep your Athena account active. You need to get an "Athena Account Request" form from the Athena User Accounts office, have it signed by your MIT associate, and return it to the first floor of N42. If you will be working on your thesis but not registered, you'll also need to submit this form to keep your Athena account active.
Back To Top
 

IS&T Service Desk

Monday-Friday
Telephone/Online: 8am - 6pm
Walk-In (N42) 9:15am - 5pm

Web: IS&T Service Desk
Email: computing-help@mit.edu
Phone: 617.253.1101