popd - pop the directory stack or remove and entry
pushd [-p] [-l] [-n|-v] [name|+n]
This command is a C-shell built-in command.
Without arguments, the popd(1) command exchanges the top two elements of the directory stack. If pushdtohome is set, pushd without arguments does 'pushd ~', like cd(1) . With name, it pushes the current working directory onto the directory stack and changes to name. If name is '-', it is interpreted as the previous working directory (see "File-name substitution" in tcsh(1) ). If dunique is set, pushd removes any instances of name from the stack before pushing it onto the stack. With a number '+n', pushd rotates the element of the directory stack identified by n around to be the top element and changes to it. If dextract is set, however, 'pushd +n' extracts the directory identified by n, pushes it onto the top of the stack and changes to it.
All forms of pushd print the final directory stack, just like dirs(1). The pushdsilent shell variable can be set to prevent this, and the -p flag can be given to override pushdsilent. The -l, -n and -v flags have the same effect on pushd as on dirs(1) .