Operating System - HP-UX
1837836 Members
2435 Online
110121 Solutions
New Discussion

Access links through a mount

 
SOLVED
Go to solution
Brecht De Baets
Frequent Advisor

Access links through a mount

Hello,

On my unix system I have mounted a directory of another unix system.
When I do an ll, I see the following :

lrwxrwxrwx 1 root sys 20 May 9 2005 2004 ->/copydir/efsd11/2004
drwxrwxrwx 14 root sys 2048 Nov 2 2005 2005

I have access to the dir 2005, but not to the dir 2004 (cd 2004 => 'sh: 2004: not found').
Is there anyway to access the dir 2004 through the mount ?
6 REPLIES 6
Brecht De Baets
Frequent Advisor

Re: Access links through a mount

I forgot to say that I issued the 'll'-command from the mounted directory !

so : 1) cd /mnt/mounted_dir
2) ll
3) output =
lrwxrwxrwx 1 root sys 20 May 9 2005 2004 ->/copydir/efsd11/2004
drwxrwxrwx 14 root sys 2048 Nov 2 2005 2005


Regards,
Brecht
Peter Godron
Honored Contributor

Re: Access links through a mount

Brecht,
The 2005 dir is local to the mounted directory, so you can access.

The 2004 directory is a link to /copydir/efsd11/2004, which I assume is not mounted onto your machine. So the link is pointing to a dir that is not available to you.

You would have to mount the /copydir/efsd11 also onto your machine.
Brecht De Baets
Frequent Advisor

Re: Access links through a mount

Thanks,

But is there no other way to access that dir,
without mounting that linked directory ?

Regards,
Brecht
George Liu_4
Trusted Contributor

Re: Access links through a mount

df
to see /copydir/efsd11 is mounted
if not, mount if first either through local or nfs
then you can access dir 2004
Bill Hassell
Honored Contributor
Solution

Re: Access links through a mount

Symbolic links are nothing more that a string of characters that act like an alias. If you create a symlink filea and point to fileb, mentioning filea in a shell command will translate filea to fileb. But you can move or remove fileb and the filea link is unaffected -- there is no connection between the link and the target.

So in your case, the symlink 2004 is an alias for /copydir/efsd11/2004. There is nothing in the link to specify that this directory is on another computer. If /copydir (or /copydir/efsd11...) isn't on your local system, you'll get the error message.


Bill Hassell, sysadmin
Brecht De Baets
Frequent Advisor

Re: Access links through a mount

Hello,

I have mounted /copydir on my unix and my problem is by this way solved.

Thanks,
Brecht