LinuxQuestions.org
Visit Jeremy's Blog.
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, 05: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, 05:34 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
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, 05:35 PM   #3
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Jessie, Linux Mint 17
Posts: 7,751

Rep: Reputation: 272Reputation: 272Reputation: 272
"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, 07:24 PM   #4
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
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


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


All times are GMT -5. The time now is 10:45 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration