LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Deleting soft links They won't go away (https://www.linuxquestions.org/questions/slackware-14/deleting-soft-links-they-wont-go-away-746096/)

zeelog 08-08-2009 03:53 PM

Deleting soft links They won't go away
 
My friend's system has big trouble with soft links.
They are getting in the way of his cdrom and dvdrw.
I've got no idea how this happened, but how do I
delete these soft links ?
/dev/dvd -> hdc
/dev/dvdrw -> hdc
/dev/cdrom -> hdc
/dev/cdrw -> hdc
hdc does not exist. It isn't anywhere in the system.
rm hdc results in the message
" no such file or directory " and nothing happens
ln -f cdrom hdc fails with the message
" too many levels of symbolic data "
I'm thinking of zapping the entire OS because without
the optical drives working properly, most of what he
wants the computer for is not working.
Next time, he says, he'll ask me first before creating
any links, soft or otherwise.
Is there anyway to get rid of these soft links or
should I save his data, erase the partition and
re-install the OS ?

David the H. 08-08-2009 04:47 PM

These links are automaticaly generated by udev based on rules found in /etc/udev/rules.d (though the location may be slightly different between distros, I'm not sure). You probably need to find the config file that contains this rule and modify it so that it doesn't create the symlinks.

Sorry if I can't give you any more detailed info on how to fix it, however. I've never had to deal with hard disk rules personally. I think the hard disk rules may be a bit more complex than most, and probably call external scripts to generate the device names.

It's strange that they should appear though. If the hdc device really isn't present on your system, then udev shouldn't be creating them in the first place. Has something about the hardware configuration been changed recently?

But in any case, you don't have to use /dev/cdrom. All you have to do is find the real device entry for your cdrom drive and use that instead.

Romanus81 08-09-2009 11:34 AM

The only thing I can think of is removing them by their inode number.
http://www.cyberciti.biz/tips/delete...de-number.html

Just a note: if they are indeed soft links, then the inode number of the original and link will be different, if they are the same, then they are hard links.


All times are GMT -5. The time now is 03:20 AM.