- Copy this file to somewhere (e.g.
~/Better_cd.sh
). - Add the following line to your .bashrc:
source ~/Better_cd.sh
- Resource the .bashrc by executing the command:
source ~/.bashrc
cd
now also recordspwd
to the.dir_history
cdl
list the directories you have been to.cdl 20
list 20 directories you have been to.cdd
go to the last directorycdd 4
go to the fourth directory listed bycdl