Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 08-08-2009, 04:53 PM   #1
Registered: Jan 2008
Posts: 135

Rep: Reputation: 1
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 ?
Old 08-08-2009, 05:47 PM   #2
David the H.
Bash Guru
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian + kde 4 / 5
Posts: 6,837

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
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.
Old 08-09-2009, 12:34 PM   #3
Registered: Feb 2008
Posts: 201

Rep: Reputation: 31
The only thing I can think of is removing them by their inode number.

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.


deleting, links, soft

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Deleting soft link to directory sudevank Linux - General 6 03-07-2007 11:56 PM
technical question about hard links v soft links 7stud Linux - Newbie 2 02-23-2007 07:57 PM
links (hard links and soft links..) sachitha Programming 1 08-10-2005 01:10 PM
Soft Links tonphi Red Hat 1 09-22-2003 10:20 PM
deleting orphan files and creating soft links cuss Linux - General 6 02-24-2003 10:43 AM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:17 AM.

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