Friday, January 27, 2012

pushd and popd

pushd saves the current working directory in memory.
popd returns to the path at the top of the directory stack.

Example
[sputnik@localhost html]$ pushd . # push current directory to memory
/var/www/html /var/www/html

[sputnik@localhost etc]$ cd /var/games/ # change directory

[mshnaydman@localhost games]$ popd # returns from directory
/var/www/html
[sputnik@imagick-test html]$

For more information, read the Wiki Page

No comments:

Post a Comment