LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-30-2004, 04:09 PM   #1
Philter
LQ Newbie
 
Registered: Nov 2004
Distribution: Slackware 10.0 and Gentoo
Posts: 10

Rep: Reputation: 0
Is there a way to remove a symbolic link


I was installing MySQL earlier today and the manual says to make a symbolic link to the mysql folder. But when I tried that I got an error saying that mysql already exists. So I'm wondering if there's a way that I can remove a symbolic link and if there is a way to find what a given link is linked to. Maybe there is a system config file with all the links in them or something.
 
Old 11-30-2004, 04:34 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
just delete it like a normal file. "rm /var/something/symlink". to see where a link goes, just look at "ls -l /var/something/symlink" and it will tell you where it goes. there is no central registry for them, they are their own self enclosed entity, just like a normal file.
 
Old 11-30-2004, 04:35 PM   #3
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"So I'm wondering if there's a way that I can remove a symbolic link and if there is a way to find what a given link is linked to."

A symbolic link is simply a specialized type of file. You can manipulate symbolic links with the same commands used to manupilate an ordinary file. You can delete a symbolic link with the rm command and it will delete only the symbolic link, not the file linked too. You can list the files ina directory with:
ls -l /directoryname
and the ls command will show what files any symbolic link links to.

--------------------
Steve Stites
 
Old 11-30-2004, 06:24 PM   #4
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
The closest thing to a central file which stores all symlinks is an application called symlinks. You can use it to find all symlinks, find symlinks which point to non-existant files, etc.
 
  


Reply



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
Cannot remove symbolic link to directory. martint Linux - Newbie 6 09-17-2014 08:45 PM
What is a Symbolic Link? little_penguin Linux - Software 2 05-14-2005 09:27 AM
Symbolic link? jasone Linux - Newbie 4 05-06-2005 07:55 AM
symbolic link ilnli Slackware 6 01-04-2005 05:05 PM
Can't remove symbolic link kimchee411 Linux - Newbie 1 10-06-2004 02:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:19 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration