Monday, March 28, 2016

CDPATH Access any subdirectory as it was in the same level

For example, I have the directory
~/doc/example1/dir1

I'm currently in the directory
~/programs

if I want to access dir1, I would do
cd ~/doc/example1/dir1

but if my variable CDPATH is
CDPATH=.:$HOME/doc/example1

I can do only
cd dir1

and voila

No comments:

Blog Archive