Hack #4->Toggle Between Directories

You can toggle between the last two current directories using cd – as
shown below.

# cd /tmp/very/long/directory/structure/that/is/too/deep
# cd /tmp/subdir1/subdir2/subdir3
# cd –
# pwd
/tmp/very/long/directory/structure/that/is/too/deep
# cd –
# pwd
/tmp/subdir1/subdir2/subdir3

# cd –
# pwd
/tmp/very/long/directory/structure/that/is/too/deep

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s