pushd

push a directory onto a directory stack 

Command


SYNOPSIS

pushd [+n | dirname ]


DESCRIPTION

Push a directory name onto the directory stack. pushd always sets the current working directory to the directory on the top of the stack.

If you don't specify any options, pushd exchanges the top two elements in the stack.

Options

+n 

makes the n'th stack element the top of the stack by moving the top n -1 stack elements to the bottom of the stack one at a time (called stack rotation).

Valid values of n are any integer between 0 to 19.

dirname 

puts the name of the current working directory onto the top of the stack and changes the current working directory to dirname.


DIAGNOSTICS

Possible exit status values are:

0 

Successful completion.

1 

The directory name on the command line does not exist, or the directory name that should be placed on the top of the stack no longer exists, or the number specified by n is larger than the number of elements in the stack.


NOTES

pushd is a KornShell function defined in the file $ROOTDIR/etc/dir.ksh. This file is normally processed by a login shell during the processing of the file $ROOTDIR/etc/profile.ksh. If your system fails to recognize the pushd command, check your profile.ksh file to ensure that a call to dir.ksh is included.


AVAILABILITY

PTC MKS Toolkit for Power Users
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Commands:
dirs, gdir, popd

Using the MKS KornShell


PTC MKS Toolkit 10.1 Documentation Build 15.