LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-01-2009, 02:45 PM   #1
deibertine
Member
 
Registered: Mar 2009
Posts: 222

Rep: Reputation: 30
Unhappy symbolic link question


I have /home/dbertine in which needed to mv to /mnt/sda1 for our product support reasons.

So I did move the entire /home/dbertine to /mnt/sda1 and created a symblink by doing this:
ln -s /mnt/sda1/dbertine dbertine

This way I can still have my home directory under /home.

However due to some circumstance within my running scripts, this is now showing:
/mnt/sda1/dbertine/sql/query/scripts/1276/collect/train.db....

which is going to be a problem.

The script need to show /home/dbertine/sql/query/scripts/1276/collect/train.db.... instead of /mnt/sda1.

Is there a way that I can configure this to show /home/dbertine but still having the physical dir in /mnt/sda1? Not sure if that will create chaos.

Any advise is appreciated.

Thanks,
DB
 
Old 07-01-2009, 02:57 PM   #2
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
How it displays, and what it reads, is going to be all in the script itself.

What happens when you `cd` into /home/dbertine ? Do you see the files you'd expect on /mnt/sda1?
 
Old 07-01-2009, 03:18 PM   #3
deibertine
Member
 
Registered: Mar 2009
Posts: 222

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Poetics View Post
How it displays, and what it reads, is going to be all in the script itself.

What happens when you `cd` into /home/dbertine ? Do you see the files you'd expect on /mnt/sda1?
Trying to avoid changing the path of the scripts (tons of them) but I think you're right.

When I cd into /home/dbertine I can see the files I need and do a pwd i see /home/dbertine

However the script is looking into the actual physical location which is /mnt/sda1/dbertine
0 lrwxrwxrwx 1 root root 15 Jul 1 11:12 dbertine -> /mnt/sda1/dbertine

Is there other alternative way to possibly reconfigure this?

Thanks.
 
Old 07-01-2009, 04:52 PM   #4
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 618

Rep: Reputation: 237Reputation: 237Reputation: 237
I think "mount --bind" will do what you want. Check out the mount man page.
 
Old 07-01-2009, 05:15 PM   #5
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,072

Rep: Reputation: 384Reputation: 384Reputation: 384Reputation: 384
I can't really tell without looking at the script.

Just bear in mind that some programs will use the raw path, as passed. Some others will deference it and use the real path instead. Some others will act in one or another way depending on some command line switch. So, we first would need to look at the script, see how it handles the paths and what commands/tools uses, and then fix the problem.

Alternatively, just mount -obind instead of symlinking. It should just make your problem disappear.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Link Question 454redhawk Linux - General 6 10-13-2008 11:24 PM
Question Symbolic Link SBN Linux - General 5 07-23-2007 01:25 AM
Small question about /etc/rc.local - Symbolic link question Arodef Linux - General 4 05-13-2006 02:29 AM
symbolic link question vpv Linux - Newbie 6 10-25-2005 04:02 AM
symbolic link question nalkinburgh Linux - General 2 12-20-2002 12:56 PM


All times are GMT -5. The time now is 08:01 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration