When I change into a directory with the cd command, I lose the previous working directory, unless I remember it in my memory. Is there some handy method to go back quickly?
cd
Demo:
$ cd ~/some_path $ cd /another_path $ command_to_go_back_to_some_path
You can go back to the last dir with cd -
cd -
1.4m articles
1.4m replys
5 comments
57.0k users