+n: Rotates the stack so that the nth directory (counting from the left of the list shown by dirs, starting with zero) is at the top.
-n: Rotates the stack so that the nth directory (counting from the right of the list shown by dirs, starting with zero) is at the top.
-n Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated.
pushd returns 0 unless the directory stack is empty, a non-existent directory stack element is
specified, or the directory change to the specified new current
directory fails.
Example
Go away and returns
# we are now in /
pushd /aDir/
# we are now in /aDir/
popd
# we are now back in the starting current directory /