Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 07-01-2009, 03:45 PM   #1
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:

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.

Old 07-01-2009, 03:57 PM   #2
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, 04:18 PM   #3
Registered: Mar 2009
Posts: 222

Original Poster
Rep: Reputation: 30
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?

Old 07-01-2009, 05:52 PM   #4
Registered: Feb 2006
Distribution: Debian Sid
Posts: 696

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

Rep: Reputation: 386Reputation: 386Reputation: 386Reputation: 386
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.


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

All times are GMT -5. The time now is 10:09 PM.

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