LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-01-2005, 10:46 AM   #1
smidgie82
LQ Newbie
 
Registered: Dec 2005
Posts: 2

Rep: Reputation: 0
What's wrong with symlinks?


I don't know if this is standard behavior or not, but I'm guessing it is, since it's way too obvious to have been overlooked. I have web content stored in a directory (~/public_html/images/), and I reuse this same content in several different sites served off of the same server (served from ~/html/dir1, ~/html/dir2, etc.). So, in each site, I created a symlink to the directory (~/html/dir1/images --> ~/public_html/images).

So now, I go to ~/html/dev/images/:
Code:
cd ~/html/dev/images/
Now, if I try to go back to ~/html/dev/ from there:
Code:
cd ..
it works just fine. However, from ~/html/dev/images/, if I
Code:
cp file1 ..
it winds up in ~/public_html/, not ~/html/dev/! Is there a way to change this behavior? If not, can someone at least explain the rationale behind it?

Last edited by smidgie82; 12-21-2005 at 04:09 PM. Reason: Make title more informative to encourage more replies.
 
Old 12-01-2005, 04:00 PM   #2
alienDog
Member
 
Registered: Apr 2004
Location: Europe
Distribution: Debian, Slackware
Posts: 505

Rep: Reputation: 48
cd .. && cp images/file .

... maybe

Seriously, I don't have the solution but I do admire your problem. I remember reading a plan9 document with title "What's wrong with symlinks" or something like that that might be of help, but unfortunately I'm unable to locate it right now
 
Old 12-21-2005, 04:13 PM   #3
smidgie82
LQ Newbie
 
Registered: Dec 2005
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks for the reply. I've done some searching since the original post, and I haven't been able to find any explanation for the rationale... I'm gonna do some kernel hacking and see if I can't change this behavior.

I went ahead and changed the thread title to make it more informative. Anyone else have input?

Thanks!
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
? on symlinks eroica Linux - Software 1 09-21-2004 09:45 AM
symlinks.. NSKL Slackware 3 05-26-2002 05:35 PM
symlinks not working terrykem Linux - General 4 12-06-2001 08:30 PM
Symlinks b0b0 Linux - General 2 11-08-2001 08:43 AM
symlinks tstuhr Linux - General 3 10-05-2001 10:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration