LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   How can I fix an ungodly amount of broken symbolic links? (https://www.linuxquestions.org/questions/slackware-14/how-can-i-fix-an-ungodly-amount-of-broken-symbolic-links-178763/)

spoonz 05-06-2004 09:56 PM

How can I fix an ungodly amount of broken symbolic links?
 
Hi, I attempted to install the 2.6 kernel on my machine I'm running slackware 9.1 with the 2.4.26 kernel installed prior to this (it's still there).


I (ha ha) thought things went smoothly, it turns out they did not. as i attempted to lsmod I received the following message:
Kernel requires old lsmod, but couldn't run lsmod.old: Too many levels of symbolic links

then the following as root to look for broken symbolic links:

( find / -type l | xargs file ) | grep 'broken symbolic link'

ooh.. I was slack-jawed at the results.. tons.

I've been poking around the web looking, reading and questioning for what i've done/not done to have made this happen, and how I can repair it. If someone could pass along some advice on this I would truly appreciate it.

Thanks
spoonz

Muzzy 05-07-2004 03:04 PM

Quote:

Too many levels of symbolic links
This happens if you have a link pointing to itself, or some other arrangement of recursive links
For example try this as user, in your home directory (you need write access):

Code:

$ ln -s foo foo
$ ls foo
ls: foo: Too many levels of symbolic links
$ rm foo

So it looks like you probably have a link pointing to itself. Perhaps lsmod.old?

As for broken links, I tried that command on my system, and counted the number of broken symbolic links:

$ ( find / -type l | xargs file ) | grep 'broken symbolic link' | wc -l
296

So I guess it's normal and nothing to worry about!

Mark.


All times are GMT -5. The time now is 01:06 PM.