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 also do this
$ pushd ~/some_path $ pushd /another_path $ popd $ popd
1.4m articles
1.4m replys
5 comments
57.0k users