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.
Here's an interesting problem.... In order to run java on my computer, I tried to ln -s /opt/jdk1.something/bin/* /usr/bin. It didn't work, and I tried to run java, but it said there were too many levels of symbolic links. While screwing around with it I accidentally (forgetting I cd'ed into /usr/bin) did ln -s * /bin. Now everything in /usr/bin is in /bin, and make is complaining about too many levels on symbolic links. Since I'm running Gentoo this is a huge problem. Any ideas?
You could ls -l | grep -e ^l to find all the symbolic links in one directory (say, /usr/bin) then do the same in the other directory (/bin) and then compare the two results. Remove the ones which you don't need. Which ones "should" be there? it's hard to say, distributions vary so much, along with what one user has installed vs. another.
Worst case you could make a backup, use konqueror and sort by permissions so all the symbolic links are grouped together, and remove all but the ones which should be there with a default installation, and then recreate each symbolic link as required (tedious, I know )
I like that idea, but do you know of any way to use a bash script or the like to do that for me? Sorry, sounds really stupid, but I don't really have much time to filter through it. I was thinking about using grep to find out which files matched and then delete them. I don't know if this makes, any sense, it's a mix of bash and java, but, rm /bin/(ls /usr/bin). Or if one could isolate one file at a time. I might just write a java program... hmm...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.