How do you use CDPATH?

Tom Armistead toma at swsrv1.cirr.com
Fri May 3 17:06:03 AEST 1991


In article <1991May2.203153.13842 at mnemosyne.cs.du.edu> jscott at isis.cs.du.edu (James Scott) writes:
>How do you use the environment variable CDPATH? I'm using
>both ATT SysV.3's sh and ntcsh version 5.12.
>Thanx,
>		James
>
>--
>=========================================================================
>James Scott                                       scott at gwhs.colorado.edu 
>                                                    jscott at isis.cs.du.edu
>George Washington H.S., Denver				     gwhs at csn.org

The CDPATH env var is used by the shell cd command.  cd will search for the
named directory along the path specified by CDPATH and if it finds it, will
change to it.  This allows you to change to directories without specifying
the full path.
  Ex.
    $ CDPATH=$HOME:/usr:/usr/local;export CDPATH
    $ mkdir $HOME/testing
    $ cd /
    $ cd testing

Tom
-- 
Tom Armistead - Software Services - 2918 Dukeswood Dr. - Garland, Tx  75040
===========================================================================
toma at swsrv1.cirr.com                {egsner,letni,ozdaltx,void}!swsrv1!toma



More information about the Comp.unix.questions mailing list