re: #OneDevMinute: Go back to the Previous Directory VIEW POST

TOP OF THREAD FULL DISCUSSION
re: I think popd pops off of the directory history stack, rather than the directory hierarchy itself; so if you do this: $ pushd /tmp $ pushd $ push...

Makes a lot of sense. And I think typing

-

to go to prev dir is quite easy for me to remember. Wouldn't you agree? 🤔

correct, popd uses the pushd history; it does not use the directory hierarchy. Use cd .. for that.

code of conduct - report abuse