Search code examples
terminalcygwincd

Is there a way to go two directories back in cygwin (linux)?


I know that you can go back one directory in cygwin by using the dash (-). But, how do you go back more than one directory in your history?

I've tried cd -- it doesn't seem to work. Thanks! This would be very very helpful.


Solution

  • You can use pushd and popd. pushd adds a directory to stack, popd removes it. See man bash for details.