LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-13-2006, 12:54 AM   #1
3saul
Member
 
Registered: Aug 2004
Location: Brisbane, Australia
Distribution: Ubuntu/Fedora
Posts: 86

Rep: Reputation: 15
Multiple symbolic links


Is it possible to have symbolic link x point to two or more locations on disk? For example

/home/jo/symbolic link

points to
/var/log & /proc

???
 
Old 01-13-2006, 01:38 AM   #2
dombrowsky
Member
 
Registered: Dec 2005
Location: New York
Distribution: Debian/GNU
Posts: 235

Rep: Reputation: 31
If that was possible, how would the operating system know which file to access?
 
Old 01-13-2006, 03:22 AM   #3
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
What exactly are you trying to do? Knowing what you're trying to accomplish would probably be helpful
 
Old 01-13-2006, 05:37 AM   #4
3saul
Member
 
Registered: Aug 2004
Location: Brisbane, Australia
Distribution: Ubuntu/Fedora
Posts: 86

Original Poster
Rep: Reputation: 15
I want to have the contents of two folders appear in one other folder. I think I'll have to just create a script that will manually create symbolic links from both folders into the 3rd and over-right any pre-existing sl's.

Any other idea's?
 
Old 01-13-2006, 06:27 AM   #5
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
Have two links, one for /proc and one for /var/log.

Why would you want to mix up the contents of those two directories like that. What happens if there is a file in /proc that has the same name as a file in /var/log?
 
Old 01-13-2006, 08:49 PM   #6
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
The point that dombrowsky and phil.d.g made is relevant. To illustrate, suppose you have a file named README.txt in /var/log and you also have a totally different file that also happens to be named README.txt in /proc

Now, if the /home/jo/symlink directory contained softlinks to all files in both directories, how would the system handle the fact that the "README.txt" softlink needs to simultaneously point to two different files in two different directories? Similarly, if you tried to open "README.txt", would you be reading the contents of the file in /var/log, or the file in /proc? As they have stated before, I also would recommend using two sets of links.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
symbolic links durden2.0 Linux - Newbie 6 11-12-2008 03:06 AM
Symbolic Links Greg_courageous Linux - Newbie 1 05-10-2004 07:05 AM
Symbolic Links petercool Linux - General 2 08-20-2003 11:15 AM
Symbolic links bkmesenbrink Linux - Newbie 2 11-13-2002 11:54 AM
Symbolic links pdstatha Programming 1 04-08-2002 09:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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