cd -Another interesting possibility is cd -, which takes you back to your previous directory and then runs the pwd command for you, printing your new (or is it old?) location. You can see it in action in this example. $ pwd /home/scott $ cd music/new $ pwd /home/scott/music/new $ cd - /home/scott Using cd - can be useful when you want to jump into a directory, perform some action there, and then jump back to your original directory. The additional printing to the screen of the information provided by pwd is just icing on the cake to make sure you're where you want to be. |