What is the difference between "add" and "attach"?
"add" is not really a command, but an alias that is defined by the standard athena dotfiles. The difference between "add" and "attach" is that "attach" only attaches the locker that you specify, whereas "add" does the following:
- attaches the locker
- extends your "PATH" environment variable to include /mit/lockername/arch/$ATHENA_SYS/bin or /mit/lockername/$bindir if /mit/lockername/arch/$ATHENA_SYS/bin does not exist
- extends your "MANPATH" environment variable to include /mit/lockername/man
Thus, if you use "add", you will be able to run programs from the
/mit/locker/arch/$ATHENA_SYS/bin directories, and also access the
manual pages in the locker, both without having to specify the path.
attach graphics /mit/graphics/arch/$ATHENA_SYS/bin/xloadimage man -M/mit/graphics/man xloadimage
or
add graphics xloadimage man xloadimage
Some lockers still use the old /mit/lockername/$bindir convention and other lockers may use both conventions. The /mit/lockername/arch/$ATHENA_SYS/bin convention is preferred.
Basically, you should use the "add" command whenever you need to run software out of a locker. If you only need to read or write files to a locker (for example, updating your group's web page, or getting files from a friend's "Public" directory), you should use the "attach" command.