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
tar the symbolic link ganga.dharan Shell Programming and Scripting 1 05-23-2008 04:11 AM
need some info about symbolic link and hard link detective linux UNIX for Dummies Questions & Answers 2 01-08-2008 03:36 AM
Symbolic Link Confusion Sepia UNIX for Dummies Questions & Answers 5 05-07-2007 02:40 PM
Creating symbolic link charbel Shell Programming and Scripting 9 10-01-2006 08:46 AM
1 symbolic link to 2 different places? Bashar UNIX for Advanced & Expert Users 2 08-27-2003 04:40 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-12-2004
bhargav's Avatar
Registered User
 

Join Date: Sep 2004
Location: USA
Posts: 511
symbolic Link

question abt symbolic link ...

i'm doing the following ...

ln -s x.sh ./scripts/y.sh

and

cat ./scripts/y.sh

it is giving following error

cat: cannot open y.sh

Any reason u an think of ?

But it is working fine when i goto scripts directory and cretae the symbolic link.

cd scripts
ln -s ../x.sh y.sh

and if i do

cat y.sh .... it is displaying the contents of x.sh



Thanks for any insight on this.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 10-15-2004
RTM's Avatar
RTM RTM is offline
Hog Hunter
 
Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
When you did this command

ln -s x.sh ./scripts/y.sh

it created a link from ./scripts/y.sh to x.sh. If you had done a ls -l ./scripts/y.sh, you would have seen that it was
scripts/y.sh -> x.sh
which means it was setting up the link as scripts/y.sh to scripts/x.sh

You should have done it as
ln -s ../x.sh ./scripts/y.sh
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




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