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

1.2k views Asked by At

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.

2

There are 2 answers

0
choroba On BEST ANSWER

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

0
Mikkel Christiansen On

Only previous dir is remembered, so Hunle's answer or some other way of remembering dirs is needed.