The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
create Virtual directories on Webserver vr76413 SUN Solaris 0 06-28-2007 01:24 PM
Create Folder in Multiple Directories Stud33 Shell Programming and Scripting 15 07-20-2006 04:44 PM
Using a C program to create directories in UNIX aloha_boi High Level Programming 3 11-14-2005 02:11 AM
How to create directories abishekmag UNIX for Dummies Questions & Answers 3 03-21-2005 01:34 PM
How do I create & Maintain directories kimjones142001 UNIX for Dummies Questions & Answers 4 09-10-2001 06:40 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-16-2008
smr_rashmy smr_rashmy is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 39
Question How to create short form for directories?

Hi Friends,

Can you please tell me how to create short form for directories?
like,

this is a directory: /usr/tmp/progs/scripts
when i give cd $short_name, it should take to the above path.

in which env setting do i have to set?

Thanks,
Rashmy.
  #2 (permalink)  
Old 01-16-2008
ghostdog74 ghostdog74 is offline Forum Advisor  
Registered User
  
 

Join Date: Sep 2006
Posts: 2,538
Code:
short_name=/usr/tmp/progs/scripts
  #3 (permalink)  
Old 01-16-2008
Tytalus's Avatar
Tytalus Tytalus is offline Forum Advisor  
echo {1..9}^2\;|bc
  
 

Join Date: Jun 2003
Location: Scotland
Posts: 431
for bash at least:

Code:
CDPATH=./:<PATH TO BASEDIR>
should work - i.e. will let you cd to dir's within BASEDIR

or if that's not quite what you mean, use ln to make a link....
  #4 (permalink)  
Old 01-16-2008
Slick Slick is offline
Registered User
  
 

Join Date: Aug 2006
Posts: 17
Use the link command ... it's easier.
  #5 (permalink)  
Old 01-26-2008
smr_rashmy smr_rashmy is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 39
are these commands scope is upto session?

i want that short_variable to be exist for any session..
  #6 (permalink)  
Old 01-26-2008
Shaikjaveed Shaikjaveed is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 2
Exclamation

Hi,

I believe that the ln command would help solve your problem.

you could try using the following command:

ln -s /usr/tmp/progs/scripts <any name>

eg: ln -s /usr/tmp/progs/scripts ~/scrilink

so you can do : cd ~/scrilink

This is my first post in this forum. hope you find it useful.
  #7 (permalink)  
Old 01-26-2008
smr_rashmy smr_rashmy is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 39
but the ln is used to create a link for files r8?

i want to do it for directory.

if i give cd $tmp
means

it should take me to the diectory defined in the tmp variable.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:00 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0