This is a discussion on Hard links / symbolic links - is this what I need? within the Linux software forums, part of the Linux Getting Started category; I run a dual booting laptop with Win XP SP2 on one partition and Ubuntu 7.04 on another. Each system ...
|
|||||||
| Register | FAQ | Members List | Calendar | Forgotten your password? | Mark Forums Read |
|
|||
|
I run a dual booting laptop with Win XP SP2 on one partition and Ubuntu 7.04 on another. Each system can see all the files on the other system. I run Evolution as my email / PIM programme on both systems, v 2.8.2 on XP and v 2.10.1 on Ubuntu.
I want to have just 1 set of data files - calendar; contacts list; email in/out boxes; ..etc.. - shared between the two systems as my time is more or less equally shared between the two systems. It has been suggested to me that I can achieve this by having the data files on XP and setting up a series of symbolic links in the relevant directories in Ubuntu, linking to the XP files. I gather from reading the reference data on Links that I need a symbolic link rather than a hard link because I'm working across system boundaries. It will involve quite a bit of work to set this up and I want to get a better understanding of whether the links will actually achieve what I want before I embark on a complicated set-up process. I don't yet understand how linking works. For example, if my data files are on the XP partition and I am working in Ubuntu, and I send an email or enter a new contact - will the linking cause the new data to be entered to the file on the XP partition rather than to the file within the Ubuntu partition, or does it get entered in both files? What if I'm in XP and do the same thing? In general terms, what's the difference between a hard link and a symbolic link, and when do you use each type? Can somebody point me at a tutorial that gives a plain English description of what links are, what they do and how to correctly use them? In responding, please bear in mind that I have very limited understanding of Linux terminology. I've had 20 years of computing experience, mostly with Win systems, so please don't bury me under Linux geek-speak. |
| Sponsored Links | ||
|
|
|
|||
|
Monk - many thanks for your explanation. I now have a better understanding of what the soft link can achieve, but I'm not yet clear on how to implement it as I'm planning to.
Specifically, I have the following situation. Let's look at Calendars. On Ubuntu I have: ~/.evolution/calendar/local/system/calendar/calendar.ics On XP I have c:/Documents and Settings/david/.evolution/calendar/local/system/calendar/calendar.ics Not surprisingly, the same sub-directory structure and same file name within Evolution on both systems. A similar situation exists with Tasks, Email, ..etc.. In this situation: 1. Where do I locate the link? 2. Given that the file name is identical in each system, how do I word the link? In determining the path within XP, another issue arose - the spaces in the directory name. I tried to use Terminal to determine the path but got stuck after /media/hda1/. 'ls' shows the directory Documents and Settings, but no matter what I enter after a 'cd' command I get "No such file or directory". I had to go back into XP to work out what the path was. How, within Linux, do I correctly enter a Windows directory name that contains spaces? A final complication. Within XP I have two drives, c: and d:. I keep the c: drive for the OS and the d: drive for my working files. Usually when I use Terminal to look into the XP drive, cd /media/hda1 takes me to the c: drive, but occasionally it takes me to the d: drive. How do I specify which drive I go to? This may have some bearing on how the soft link gets worded. |
|
||||
|
Make a backup of data before running following commands:
Code:
cd /media/hda1/ cd "Documents and Settings" ls ls -l pwd Now you can run ln -s command bu you must remove Linux ~/.evolution and link the same. So first backup Email data on Windows, If anything goes wrong you can just restore and start again Make sure evolution app is not running. On Linux, enter: Code:
cd mv .evolution .evolution.old ln -s "/media/hda1/Documents and Settings/david/.evolution" . |
|
|||
|
Vivek,
The solution you gave will solve the purpose. As far as I remember, I have tried this in Fedora/SuSE and I have some issues with this. The situation is something like this: What if we create a normal user ( ex: ricc ) and try to use the *.ics file? It will not be able to write to the file. Because Linux doesn't allow write access to other users. What we can do is manually change the ownership permissions for the file by making the user the owner of the file. But this is not permanent. Esp when /media/hda1 ( or whatever the Windows Partition is mounted to) is remounted, it changes back to the default permission. We will need a script to change the permissions back to what we want or else the user will not be able to write to the *.ics file. Hope I am clear. ricc |
|
||||
|
ricc,
You can always modify /etc/fstab file and set user permission. Look for umask and uid. For multiple users (a bad idea, IMHO) you can use Linux group management and setup gid. man mount documents all options. |
|
|||
|
Monk / Nixcraft / Ricc - my thanks to each of you for the advice. I've developed a problem with Evolution loading within Win XP, which I'll have to sort out before I resume this file-sharing exercise; Evolution will currently only run under Linux so file sharing has temporarily ceased to be an issue. I've got a heavy work programme for the next week or two so I'm not sure how soon I'll get back to this.
|
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Script per informazione di hard disk | RamPD | Shell scripting | 0 | 04-07-2008 08:22 PM |
| Hard Link Query | sharadgana | Getting started tutorials | 2 | 03-25-2008 01:11 AM |
| USB Hard Drive Multi-Boot | ceptune48 | Linux hardware | 0 | 12-31-2007 05:26 PM |
| hard disk backup | zafar466 | Linux software | 1 | 06-29-2007 02:47 AM |
| SATA Hard Disk not detected | rajuk | Linux software | 4 | 10-24-2005 02:57 PM |