CDPATH From Linux

  Use CDPATH to define the base directory for cd command

If you are frequently performing cd to subdirectories of a specific parent directory, you can set the CDPATH to the parent directory and perform cd to the subdirectories without giving the parent directory path as explained below.

To make this change permanent, add export CDPATH=/etc to your ~/.bash_profile

[ramesh@dev-db ~]# pwd
/home/ramesh
[ramesh@dev-db ~]# cd mail
-bash: cd: mail: No such file or directory
[Note: This is looking for mail directory under current directory]
[ramesh@dev-db ~]# export CDPATH=/etc
[ramesh@dev-db ~]# cd mail
/etc/mail
[Note: This is looking for mail under /etc and not under current directory]
[ramesh@dev-db /etc/mail]# pwd
/etc/mail