Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!uwvax!astroatc!glen From: glen@astroatc.UUCP (Glen Ecklund) Newsgroups: comp.unix.questions Subject: Re: Changing Directory Keywords: cd Message-ID: <2505@astroatc.UUCP> Date: 3 Aug 89 14:56:35 GMT References: <5068@mtuxo.att.com> Reply-To: glen@astroatc.UUCP (Glen Ecklund) Distribution: usa Organization: Astronautics Technology Cntr, Madison, WI Lines: 18 In article <5068@mtuxo.att.com> jld@mtuxo.att.com (XMRJ4-J.DALTON) writes: >QUESTION: I have a very long path which is quite tedious to type in > every time I wish to visit a certain directory. > My question: Is there a way that I can put this path in a > file, then execute a shell that will place me in that directory? The key is to use the '.' command (sh) or 'source' command (csh) to avoid creating a new shell, and execute the cd in the current shell. The way I do it is to have a list of aliases which are set up when I log in, so I can hop around even more easily: alias cdns32 'cd ~/src/dbx/ns32; pwd' alias cdddt 'cd /usr1/NSC/src/cmd/ddt; pwd' alias cdst 'cd ~/src/st; pwd' alias cdpas 'cd ~gsf/comp/src/fe/src/pcfe/src; pwd' Glen