DEV Community

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

Collapse
 
asamolion profile image
Muhammad Osama Arshad • Edited

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
 
ahmadawais profile image
Ahmad Awais ⚡️ • Edited

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
 
ahmadawais profile image
Ahmad Awais ⚡️

Glad you liked it. 🙌