Use “cd -” to toggle between the last two directories

You can toggle between last two 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

0 comments:

Post a Comment

STEALTH HACKER

Sponsers