How to go back in directory history with the bash command and other tricks.
To undo the cd command if you typed it by accident, enter this command. ~$ cd -~$ cd – This will take you back in the directory history. A very useful trick. Typing this is another good trick. ~$ cd –~$ cd — This seems to take the user back two steps. Another useful way … Read more