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

There's also the pushd and popd commands which are part of bash already.

And there's a wikipedia entry for this even: http://en.wikipedia.org/wiki/Pushd_and_popd



You can also use the "dirs" command (I think part of bash as well) that tells you the state of the stack. If you set the -v option, you can get the depth of different directories, and you can just do pushd +N to jump to the specific directory.


funny- I don't see man pages (nor info pages) for pushd, popd, or dirs. What am I missing about the documentation?


They're shell built-ins, so use "man bash" to read about them.


To only display information about a specific command, you can also use

    help <command>


Awesome. Thanks.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: