$cdpath?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers $cdpath?
# 1  
Old 11-05-2001
Question $cdpath?

Hello

I just read about some Shell variables. There is one named CDPATH. Could some one breifly explain how to use it and what that the purpose is of it?

I issued echo $CDPATH but the output was nothing.

Thanx
Marcus
# 2  
Old 11-05-2001
CDPATH, when set, will tell the cd command to search those paths when looking for the target directory. For example:
% echo $CDPATH
.:/usr/local
% pwd
/home/myuser
% cd bin
% pwd
/usr/local/bin
 
Login or Register to Ask a Question

Previous Thread | Next Thread

2 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

environment variables in cdpath

CDPATH=.:/users/:/users/user1/:/users/user1/dir1/ is ok but CDPATH=.:$HOME/:$HOME/dir1/ fails although $HOME=/users/user1 why? (3 Replies)
Discussion started by: gfhgfnhhn
3 Replies

2. UNIX for Dummies Questions & Answers

Cdpath

i add a new path to CDPATH but i cannot go to that path the error is as follows: export CDPATH:$CDPATH:/home/dir1/dir2 cd dir2 ksh: dir2: not found what is the problem? (1 Reply)
Discussion started by: gfhgfnhhn
1 Replies
Login or Register to Ask a Question