Symbolic Link In Linux

Aug 12, 2010 at 7:06 PM

Please let me know what will happen if this application access the Symbolic link in Linux.

Whether it will follow the link or just copy the file.

 

Please give me an Idea.

Coordinator
Aug 13, 2010 at 8:56 AM
Edited Aug 13, 2010 at 9:00 AM

Hi there,
I just tried it on my OpenSuse box and it actually worked.
It resolved the link and uploaded the files. Give it a try and let me know if it works with you. I created the link using the command line 

 

ln -s <source> <linkName>

 

I haven't tried downloading yet.

Aug 13, 2010 at 9:19 AM
Edited Aug 13, 2010 at 9:31 AM
voodoor wrote:

Hi there,
I just tried it on my OpenSuse box and it actually worked.
It resolved the link and uploaded the files. Give it a try and let me know if it works with you. I created the link using the command line 

 

ln -s <source> <linkName>

 

I haven't tried downloading yet.

Now I am facing a problem due to Symbolic Link in Linux like following illustration:

Suppose

/home/XYZ is home dir


there is directory ABC/mydoc/ i.e., Absolute Path /home/XYZ/ABC/mydoc


Now this directory contains a link which points to ABC directory (i,e., /home/XYZ/ABC/mydoc/link_to_ABC)


means link_to_ABC -> /home/XYZ/ABC


Then this application is just following the Symbolic link and adding same file or directory recursively.


I want to know that , is there any option to stop following Symbolic Link? Please help me on that.



if my problem statement is not clear then please reply me.

Coordinator
Aug 14, 2010 at 9:23 PM
Edited Aug 14, 2010 at 9:24 PM

I see what you mean. With the current code it will go into an infinite recursion.

Currently there is no way of stopping that

I'll add some logic to stop revisiting folders that have already been visited or stop visiting links.

Aug 14, 2010 at 9:30 PM
thanks... And sorry for asking such question which increases your job... :D