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 |
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? |
Quote:
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. |
I think "mount --bind" will do what you want. Check out the mount man page.
|
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. |
All times are GMT -5. The time now is 04:16 AM. |