How to Create a Symbolic Link to a Mounted Volume
Derek Broughton
derek at pointerstop.ca
Sun Feb 1 01:42:28 UTC 2009
Markus Schönhaber wrote:
> Dom Incollingo:
>
>> I mounted a home directory from another computer via sftp. The directory
>> is mounted as:
>>
>> sftp://dji@linux/home/dji.
>
>> I tried to make a symbolic link to this directory by running the command
>>
>> ln -s sftp://dji@linux/home/dji anotherHome
>
> You can't create usable symlinks pointing to somewhere outside the
> filesystem tree.
Of course, you really can, but the other filesystem must be _mounted_ into
your hierarchy. My /etc/fstab has a number of entries like:
//DOMAIN/SHARE /home/derek/DOM_MOUNT cifs \
noauto,user,credentials=/home/derek/.cred,rw 0 0
and after I "mount ~/DOM_MOUNT" I can treat it like a local mount -
including making symlinks to files in its own filesystem.
...
> Out of curiosity: why do you want to do that?
Because you can? :-)
Seems to me that a great deal of effort has been put into both KDE & Gnome to
make it possible to treat remotely "accessed" (as opposed to explicitly
mounted) filesystems as if they're local.
The problem in this case is that, as Markus points out, it's something that
_Gnome_ can do (and I'd just like to mention that KDE has been able to do it
for much longer!) but if you're working in the CLI at the level of "ln",
then you're working at the same level as "mount", and you need the filesystem
explicitly mounted before you can do things like that.
More information about the ubuntu-users
mailing list