Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

pushd and popd can be used maintain an easily rewindable history of places you have been. Use pushd to add the cwd to the stack and cd to another directory. Use popd to cd to the top dir on the stack and remove it.

    $ pwd
    /dir1
    $ pushd /some/other/dir
    /some/other/dir /dir1
    $ pwd
    /some/other/dir
    $ popd
    /dir1
    $ pwd
    /dir1


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: