Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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).
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.