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

Also: Accidentally ran `cd`? Run `cd -` to return

I think there are some pop/push mechanics for working directory too, but I can't find them right now.




The commands are pushd and popd, and they're bash (and zsh, and most sane shell) builtins. Pushd to get to a new directory, popd to go back to the last one on the stack.


Tip : Setting cd as an alias for pushd make the whole thing much more intuitive.


Oh handy! Hadn't come across that before. Thanks.




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

Search: