Linux Question

Go few directories up in linux

When I want to go one directory up I use cd .. But when I want to go 7 directories up is there any way to do this other than just typing 7 times cd .. ?

cd ../../../../../../../

Also another useful navigation tip is if for example lets say you keep switching from a direcotry (call it A) to another (call it B) that's 7 directories up as in your case.

So if you in directory A:

A> cd ../../../../../../../
B> //now your in directory B and wanna go back to A
B> cd -

That will move right back to directory A. - expands to the previous directory you were in.