DEV Community

Discussion on: #OneDevMinute: Go back to the Previous Directory

Collapse
asamolion profile image
Muhammad Osama Arshad • Edited on

Cool idea!

I prefer to use .. to go to the previous directory

My .bash_aliases file contains this

alias ..="cd .."

So I can simply type .. to go back.

Collapse
mrahmadawais profile image
Ahmad Awais ⚡️ Author • Edited on

Well, I think you didn't watch the video. .. takes you one directory up and not in the previously opened directory. cd - takes you to the previous directory what ever it was. Try it to understand it or watch the video :)

Peace! ✌️

Collapse
asamolion profile image
Muhammad Osama Arshad

I just tried it out! Really cool. Thanks for sharing!

Thread Thread
mrahmadawais profile image
Ahmad Awais ⚡️ Author

Glad you liked it. 🙌