Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!bu.edu!transfer!lectroid!jjmhome!crackers!cpoint!frog!rmkhome!rmk From: rmk@rmkhome.UUCP (Rick Kelly) Newsgroups: comp.unix.questions Subject: Re: using cd command in a file Message-ID: <9105230900.22@rmkhome.UUCP> Date: 23 May 91 17:59:00 GMT References: <1991May20.201923.27920@garfield.ncat.edu> Reply-To: rmk@rmkhome.UUCP (Rick Kelly) Organization: The Man With Ten Cats Lines: 21 In article <1991May20.201923.27920@garfield.ncat.edu> muquit@garfield.ncat.edu (MUHAMMAD A. MUQUIT) writes: >In article <1991May20.155136.25162@ux1.cso.uiuc.edu> Charles Blair writes: >> >> I would like to get to a directory /me/A/B/C/D by just typing j. I tried >>creating a file j with cd /me/etc in it, then chmod +x j. It didn't work. >>Thanks in advance. I'm sure I'm overlooking something well-known. > >You can do the job if you put this line in your .login file: > alias j 'cd /me/A/B/C/D' > >I'm also curious why your way didn't work. I think there're lots of gurus >out there to answer this. A two line script would do it. #!/bin/sh cd /me/A/B/C/D Then chmod +x scriptname. Rick Kelly rmk@rmkhome.UUCP frog!rmkhome!rmk rmk@frog.UUCP