- Pushd and popd
In
computing ,pushd
andpopd
are commands in variousUnix ,DOS andMicrosoft Windows command line interpreter s (shells) such asBash ,
,cmd.exe 4DOS /4NT andWindows PowerShell . Both commands are used to work with the command line directory stack.The
pushd
command saves the currentworking directory in memory so it can be returned to at any time, optionally changing to a new directory. Thepopd
command returns to the path at the top of the directory stack.In
Windows PowerShell , pushd is a predefined command alias for thePush-Location
Cmdlet and popd is a predefined command alias for thePop-Location
Cmdlet. Both serve basically the same purpose.yntax
pushd
pushd [path | ..]
Arguments:
*path
Thiscommand-line argument specifies the directory to make the current directory.popd
popd
Example
ee also
*
List of DOS commands
*List of Unix programs References
* [http://technet.microsoft.com/en-us/library/bb490978.aspx Microsoft TechNet Pushd article]
* [http://technet.microsoft.com/en-us/library/bb490969.aspx Microsoft TechNet Popd article]
* [http://ftp.gnu.org/old-gnu/Manuals/bash-2.05a/html_node/bashref_73.html Bash Reference Manual: Directory Stack Builtins]
Wikimedia Foundation. 2010.