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
Change All File Names in a Directory andou UNIX for Dummies Questions & Answers 8 01-22-2008 05:06 PM
Command to list directory names only stevefox UNIX for Dummies Questions & Answers 6 11-29-2007 04:06 PM
How to sort directory names and use only last? siegfried Shell Programming and Scripting 0 09-18-2006 10:50 AM
directory names in a flat file surjyap Shell Programming and Scripting 2 10-06-2005 04:51 AM
Directory names that contain spaces and other suggestions? Shakey21 Shell Programming and Scripting 5 01-09-2002 02:29 PM

Closed Thread
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-05-2001
Registered User
 

Join Date: Sep 2001
Location: Dallas, TX
Posts: 14
Use of $ in directory names

I have a TAR (compressed) file that I uncompressed using the following command

$ tar xvf uagent.tar

It created a directory structure as follows

<root>/arcagent/UAGENT/reloc/$UAGENT_HOME/

How do I access files under the $UAGENT_HOME? Every time I do change directory command, the OS thinks $UAGENT_HOME is an alias (which it is not), and I get sent to another directory. If I try to access a file in that directory, I get a message saying the file does not exist, because the OS interprets the $UAGENT_HOME as an alias and looks for the file in another directory.

I need to get to the files under this $UAGENT_HOME directory, but can't.

Forum Sponsor
  #2 (permalink)  
Old 09-05-2001
rwb1959's Avatar
Registered User
 

Join Date: Aug 2001
Location: Virginia, USA
Posts: 438
Did you create the tar file?
If so, why would you name a directory
using a "$"? If not, tell the creator
to fix this. I suspect there is a similar
problem accessing that directory on the remote.

Having said that you should be able to
access it as follows:

cd /arcagent/UAGENT/reloc/\$UAGENT_HOME

...but personally, I hate it when people
name directories like this "on purpose"
  #3 (permalink)  
Old 09-05-2001
Registered User
 

Join Date: Sep 2001
Location: Dallas, TX
Posts: 14
Thanks so much. That worked. The directory was created by a vendor, so I have no control over it. Thanks again.
  #4 (permalink)  
Old 09-06-2001
flim flam flamma jamma
 

Join Date: May 2001
Location: Chicago IL, USA
Posts: 1,006
the "$" and many other charters are called metacharters. they have special meanings to the shell and various programs. in order to use them for there litterl meanings you must escape them. as mentioned above normally the "\" is the escape sequance.
Google UNIX.COM
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 02:03 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