home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!autodesk!dansmith
- From: dansmith@Autodesk.COM (Daniel Louis Smith)
- Newsgroups: comp.unix.questions
- Subject: Re: looking a utility to chdir without typing full path
- Message-ID: <18350@autodesk.COM>
- Date: 10 Jan 93 06:56:45 GMT
- References: <1ikvt1INNqq2@usenet.INS.CWRU.Edu> <1993Jan9.005220.19993@cs.sandia.gov>
- Organization: Autodesk Inc., Sausalito CA, USA
- Lines: 47
-
- In <1993Jan9.005220.19993@cs.sandia.gov> jhgreen@cs.sandia.gov (Jethro H. Greene) writes:
-
- > In article <1ikvt1INNqq2@usenet.INS.CWRU.Edu> cl820@cleveland.Freenet.Edu (Wei Jin Mai) writes:
- > >
- > > I just switch to Unix from Dos. Is there a utility or shell that let you
- > >change directory without typing full path? For example: chdir abc changes
- > >working directory to /usr/local/src/abc .
- > >--
-
- > "cd dir_name" should work. Also, if you want to get fancy, play around with
- > the CDPATH.
-
- $cdpath is a good answer. Here's a method to expand upon it
- and give yourself shortcuts to commonly visited directories...and without
- aliases or scripts!
-
- My cdpath:
-
- # where to find directories we're cd'ing to...
- set cdpath=(. ~ ~/.dirs ~/{src,text} /usr{,/src,/local} /home .. ../.. )
-
- Note the "~/.dirs" directory. Off of my home, I have
- this directory for the sole purpose of making symbolic links to places
- I go to frequently:
-
- bermuda:dansmith/.dirs (1) :-) ll [edited...]
- lrwxrwxrwx 1 root daemon 12 Oct 22 1991 ubx -> /usr/bin/X11/
- lrwxrwxrwx 1 root daemon 12 Oct 22 1991 ui -> /usr/include/
- lrwxrwxrwx 1 root daemon 16 Oct 22 1991 uix -> /usr/include/X11/
- lrwxrwxrwx 1 root daemon 8 Oct 22 1991 ul -> /usr/lib/
- lrwxrwxrwx 1 root daemon 14 Oct 22 1991 ulb -> /usr/local/bin/
- lrwxrwxrwx 1 root daemon 14 Oct 22 1991 ull -> /usr/local/lib/
- lrwxrwxrwx 1 root daemon 14 Oct 22 1991 uls -> /usr/local/src/
- lrwxrwxrwx 1 root daemon 18 Oct 22 1991 ulsx -> /usr/local/src/X11/
- lrwxrwxrwx 1 root daemon 12 Oct 22 1991 ulx -> /usr/lib/X11/
- lrwxrwxrwx 1 root daemon 15 Oct 22 1991 usn -> /usr/spool/news
- lrwxrwxrwx 1 root daemon 15 Oct 22 1991 usu -> /usr/spool/uucp/
- bermuda:dansmith/.dirs (1) :-)
-
- ...so I can "cd ulb" and be in /usr/local/bin. Just think of
- the ~/.dirs (or whatever you wnat to call it) as "jump off" point
- that can take you anywhere in the filesystem.
-
- Daniel
- --
- dansmith@autodesk.com daniel@world.std.com dansmith@well.sf.ca.us
- Daniel Smith, Autodesk, Sausalito, California, (415) 332-2344 x 2580
-