149
rated 0 times
[
149]
[
0]
/ answers: 1 / hits: 69580
/ 2 Years ago, mon, may 23, 2022, 3:41:39
Is there any way to jump back to the previous working directory after doing a cd
to a different directory?
My use-case is that I'm traversing a directory structure for a Java project, and I'm expecting that the current directory has only one sub-directory. So, I type cd
and hit Tab and Enter rather quickly. However, the Tab failed, as I mistakenly expected one sub-directory, when in fact there are more. So now, I just executed cd
, and am now in my home directory, instead of the Java project. Is there a way to "undo" this cd
and jump back to the directory I was in?
More From » command-line