The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Quickly navigating Web pages with Firefox extensions iBot UNIX and Linux RSS News 0 03-24-2008 12:20 AM
how to get file from Unix system heru_90 Shell Programming and Scripting 1 06-30-2006 07:54 AM
How do I send a file as an attachment (gzip file) on a Unix system lacca UNIX for Dummies Questions & Answers 3 07-03-2002 10:04 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-30-2005
Registered User
 

Join Date: Nov 2005
Posts: 2
Unix - Navigating the file system

When I log on to my unix session I have a default location. But I need to navigate 3 directories up then 6 directories down to where I want to be. There must be a way to create some sort of short cut from my defeault location to my required location. Can anyone help?
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 11-30-2005
vino's Avatar
Supporter (in vino veritas)
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,636
You must be having a .bashrc or .bash_login which must be read when you login.

I think you can make an entry as cd /target/dir in that login file.
Reply With Quote
  #3 (permalink)  
Old 11-30-2005
Registered User
 

Join Date: Nov 2003
Location: Minnesota
Posts: 381
I think what you are looking for is a symbolic link. You could create a link in your home directory to the location you want to go. Look at the manpage for the command "ln" on your system to get the right syntax. On Solaris it would be something like this:

ln -s ../../../dir1/dir2/dir3/dir4/dir5/targetdir name

Where that path is the path to the directory you want, and name is the name of the link in your home directory. After that, doing "cd name" would put you in your target directory.
Reply With Quote
  #4 (permalink)  
Old 11-30-2005
Just Ice's Avatar
Lights on, brain off.
 

Join Date: Mar 2005
Location: in front of my computer
Posts: 627
you could add the cd line that vino suggested as the last line in your default shell's initialization file (sh/ksh uses .profile, csh uses .login, bash uses .bashrc, etc.) but that might affect how you go about with your work after the initial login ...

i think your best bet is to create either a symlink to the target directory like rhfromm said or create an alias for the cd (i.e., alias mydir="cd /target/dir") in your environment file whichever one it is that your default shell uses ...
Reply With Quote
  #5 (permalink)  
Old 12-01-2005
Registered User
 

Join Date: Nov 2005
Posts: 2
Thanks for the advice people
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:57 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0