Faking an MSS Working Directory

The normal cd command is somewhat unique in that it is directly performed by your shell. The shell sets its own (internal) working directory, which child processes (commands) inherit. Thus, to get similar behavior, the mscd command must also be performed by your shell in some fashion. To accomplish this, the mscd command must be a shell function (for Bourne or ksh) or an alias (csh or tcsh) which calls another command. This auxiliary command, mscdsetup, is used both to initialize the shell and to perform the actual directory change operation.

Initially, the user must cause the mscdsetup(1NCAR) command to be run before any use is made of mscd. This can be done explicitly or implicitly via a shell startup file (note that the Bourne and ksh shells only execute $HOME/.profile at login time, not when subshells are started). When mscdsetup is run, it will initialize the NCAR_MSSPWD environment variable (if not already set) and initialize the mscd alias or function for use.

Caution

We do not recommended that mscdsetup be run automatically as part of your login process. This is because there could be a delay before the mscdsetup command is processed or it could fail, causing your login session to hang or abort.