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

Notices

Reply
 
Search this Thread
Old 08-08-2009, 03:53 PM   #1
zeelog
Member
 
Registered: Jan 2008
Posts: 109

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, 04:47 PM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946
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, 11:34 AM   #3
Romanus81
Member
 
Registered: Feb 2008
Posts: 201

Rep: Reputation: 31
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.
 
  


Reply

Tags
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 10:56 PM
technical question about hard links v soft links 7stud Linux - Newbie 2 02-23-2007 06:57 PM
links (hard links and soft links..) sachitha Programming 1 08-10-2005 12:10 PM
Soft Links tonphi Red Hat 1 09-22-2003 09:20 PM
deleting orphan files and creating soft links cuss Linux - General 6 02-24-2003 09:43 AM


All times are GMT -5. The time now is 01:08 AM.

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