| « Slashdot (useful) stupid unix tricks #4 Command output diff | Slashdot (useful) stupid unix tricks #2 - Reset your shell » |
Link: http://ask.slashdot.org/comments.pl?sid=1019609&cid=25649889
One of my favorites I learned from this thread was pushd/popd. This is a method for changing directories but also logging where you just came from so you can easily jump back. In the following example I will jump from my home directory to / to /Users and then use popd to reverse in order through the same directories.
$ pwd /Users/Bryan $ pushd / / ~
$ pwd / $ pushd Users /Users / ~
$ pwd /Users $ popd / ~
$ popd ~
$ pwd /Users/Bryan
$