Hacker News new | past | comments | ask | show | jobs | submit login

I use pushd and popd every day. If you forget what's in the stack you can see what's in it by using the "dirs" command.

You can also use pushd -n (where n is a number, although I usually end up needing trial and error to get the right one) to rotate the list of dirs without removing any from the stack - useful if the list has more than 2 directories, or 2+ directories you need to switch between repeatedly.

pushd and popd also work out of the box in Windows command prompt, although you don't get "dirs" or any fancier options like in bash, just push and pop on a plain old stack.




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

Search: