SYNOPSIS
popd [+n]
DESCRIPTION
Remove an element from the current directory stack.
With no options, popd removes the top directory stack element and sets the current working directory to the directory name of the new top element.
Options
+ n-
removes the n'th element in the directory stack. Stack elements are numbers starting at 0, with 0 being the top element. For example, to remove the second element in the current directory stack, you would specify
popd +1
DIAGNOSTICS
Possible exit status values are:
- 0
-
Successful completion.
- 1
-
When no options are given and the current working directory could not be set to the 2nd element on the stack (for example, it no longer exists). The value of n is larger than the number of elements on the stack.
PORTABILITY
Windows 2000. Windows XP. Windows Server 2003. Windows Vista. Windows 7. Windows Server 2008. Windows 8. Windows Server 2012.
NOTE
popd 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 popd command, check your profile.ksh file to ensure that a call to dir.ksh is included.
AVAILABILITY
MKS Toolkit for Power Users
MKS Toolkit for System Administrators
MKS Toolkit for Developers
MKS Toolkit for Interoperability
MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
Using the MKS KornShell
MKS Toolkit 9.5 Documentation Build 3.