Sponsored Content
Full Discussion: $cdpath?
Top Forums UNIX for Dummies Questions & Answers $cdpath? Post 9854 by Fwurm on Monday 5th of November 2001 02:58:50 AM
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 More Discussions You Might Find Interesting

1. 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

2. 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
CD(1)							    BSD General Commands Manual 						     CD(1)

NAME
cd -- change working directory SYNOPSIS
cd directory DESCRIPTION
Directory is an absolute or relative pathname which becomes the new working directory. The interpretation of a relative pathname by cd depends on the CDPATH environment variable (see below). ENVIRONMENT
The following environment variables affect the execution of cd: CDPATH If the directory operand does not begin with a slash (/) character, and the first component is not dot (.) or dot-dot (..), cd searches for the directory relative to each directory named in the CDPATH variable, in the order listed. The new working directory is set to the first matching directory found. An empty string in place of a directory pathname represents the current directory. If the new working directory was derived from CDPATH, it will be printed to the standard output. HOME If cd is invoked without arguments and the HOME environment variable exists and contains a directory name, that directory becomes the new working directory. See csh(1) for more information on environment variables. The cd utility exits 0 on success, and >0 if an error occurs. SEE ALSO
csh(1), pwd(1), sh(1), chdir(2) STANDARDS
The cd command is expected to be IEEE Std 1003.2 (``POSIX.2'') compatible. BSD
June 5, 1993 BSD
All times are GMT -4. The time now is 10:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy