Last Updated: July 19, 2020
·
1.03K
· jbrains

Visiting previously-visited directories

Try these: dirs -v and cd ~n, where n is a number matching a directory in the output of dirs -v.

2 Responses
Add your response

On my machine (fedora) dirs -v only lists one entry, the current directory. Besides that, it only seems to have history of the current session. Perhaps because I'm using SSH?

One method I like to use is a Ctrl + R to recall command history, and then start typing some part of the directory path you can remember. Then use Ctrl + R to cycle through your command history. Becomes a habit before long ;-)

over 1 year ago ·

Shame. I don't know how to account for the difference, and I also tend to use Ctrl+R myself more.

over 1 year ago ·