Pushd and popd

del.icio.us del.icio.us
Digg Digg
Furl Furl
Reddit Reddit
Rojo Rojo
Add to OnlyWire

In computing, pushd and popd are commands in various Unix, DOS and Microsoft Windows command line interpreters (shells) such as Bash, cmd.exe, 4DOS/4NT and Windows PowerShell. Both commands are used to work with the command line directory stack.

The pushd command saves the current working directory in memory so it can be returned to at any time, optionally changing to a new directory. The popd command returns to the path at the top of the directory stack.

In Windows PowerShell, pushd is a predefined command alias for the Push-Location Cmdlet and popd is a predefined command alias for the Pop-Location Cmdlet. Both serve basically the same purpose.

Contents

Syntax

pushd

pushd [path | ..]

Arguments:

popd

popd

Example

C:\Users\root>pushd C:\
 
C:\>popd
 
C:\Users\root>

See also

References

This article is from Wikipedia. All text is available under the terms of the GNU Free Documentation License.


Giant Panda

Mercedes Car
James Bond Guide
This site monitored by SitePinger.net