LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-31-2004, 12:19 PM   #1
dwater
Member
 
Registered: Mar 2004
Distribution: redhat 9
Posts: 34

Rep: Reputation: 15
Too many levels of symbolic links


Hi,

I have created a directory heirarchy which goes 6 levels deep. In each directory is a symlink to a file in the parent directory. If you follow the links, they all end up in the top level directory.

So, I get the above error message. Seems fairly self-explanitory. Looks like I am hitting a limit somewhere (looks like it is '6' or thereabouts, so it's only my deepest layer that fails).

Anyone know how I can adjust this limit?

Max.

PS RedHat 9.0
 
Old 03-31-2004, 12:44 PM   #2
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
From what I can tell by some quick googling, there is a limit on link depth (I believe enforced by the filesystem) to prevent possible infinite-recursion problems. A pathological example:

touch a
ln -s a b
rm a
ln -s b a

You'd have an infinite loop when trying to do something with either file (since they each link to the other). The limit is probably adjustable, but my advice, if you want all the links to end up in the top-level directory, is just to make links directly to the top level.
 
Old 03-31-2004, 05:49 PM   #3
dwater
Member
 
Registered: Mar 2004
Distribution: redhat 9
Posts: 34

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by wapcaplet
From what I can tell by some quick googling, there is a limit on link depth (I believe enforced by the filesystem) to prevent possible infinite-recursion problems. A pathological example:

touch a
ln -s a b
rm a
ln -s b a

You'd have an infinite loop when trying to do something with either file (since they each link to the other). The limit is probably adjustable, but my advice, if you want all the links to end up in the top-level directory, is just to make links directly to the top level.
I guess it's fairly easy to write a script to make them all point to the corresponding number of '..' up to the top level, but it is so much easier to just make it point to the one above.

I understand your explanation, but such a small limit seems very restrictive if the intention is to detect an infinite number of links....I feel like I would want to adjust it anyway.

Thanks though.

Max.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mount: Too many levels of symbolic links jpotex Slackware 7 02-13-2005 08:00 AM
two many levels of symbolic links walkant Linux - Software 3 07-14-2004 11:05 AM
Two many levels of symbolic links walkant Linux - Software 1 07-10-2004 09:14 AM
two many levels of symbolic links walkant Linux - Software 1 07-10-2004 08:54 AM
Too many levels of symbolic links Inexactitude Linux - Newbie 4 10-10-2003 06:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration