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 03-21-2004, 03:54 PM   #1
durden2.0
Member
 
Registered: May 2003
Distribution: redhat 9.0
Posts: 113

Rep: Reputation: 15
symbolic links


Ok so I have my 2.6 kernel installed and booting just fine with grub. However, I can't seem to make the symbolic link between by 2.6 kernel directory (/usr/src/linux-2.6.0) and the /usr/src/linux directory. I was trying to emerge a package in gentoo and it said the kernel version was not determined. I was trying to make the link with ln -s but it said linux/linux-2.6.0 : file exists. Is there something else I am doing wrong? I still have my 2.4 kernel installed as well, because I am still testing things with 2.6 before I commit.
 
Old 03-21-2004, 04:05 PM   #2
b0uncer
Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
did you do it the wrong way? I mean, the command goes like this:

ln -s source_directory symlink_name

where source_directory is the dir you want to be linked (/usr/src/linux-2.6.0) and symlink_name is the name of the symlink you want to create (/usr/src/linux). the symlink_name component must not already be there, because if it does, it would be overwritten and that's not done. so if you did

ln -s /usr/src/linux /usr/src/linux-2.6.0

then you got the error because a dir called /usr/src/linux-2.6.0 already exists (but on the other hand, there is no - or at least should not be - a thing called /usr/src/linux). so, to get this correct:

1) if you already have a symlink called /usr/src/linux, remove it:

file /usr/src/linux
(now this should print a line like this -> XXX: symbolink link to 'YYY' and if it does, then it is a symlink and can safely be erased. if you get an error which tells you that there is no such thing as /usr/src/linux, just move on, over the next step)
rm /usr/src/linux

2) create the symlink to the 2.6.0 directory:

ln -s /usr/src/linux-2.6.0 /usr/src/linux

and you should be fine.
 
Old 03-21-2004, 04:47 PM   #3
durden2.0
Member
 
Registered: May 2003
Distribution: redhat 9.0
Posts: 113

Original Poster
Rep: Reputation: 15
Ok, you were right that worked just fine. I didn't know that the /usr/src/linux shouldn't have already been there ... I actually created that directory and tried to link it, but what you said makes sense. As always thanks for the help!
 
Old 03-22-2004, 09:36 AM   #4
b0uncer
Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
heh, no problem
 
Old 03-29-2004, 09:52 PM   #5
gvi
LQ Newbie
 
Registered: Jun 2003
Location: Upstate New York
Distribution: Ubuntu, Unbuntu CE, Kubuntu, Core 7, VMWare on Win32 host
Posts: 6

Rep: Reputation: 0
Ok. Now how is it done in the GUI, KDE or Gnome. Please and thank you.
 
Old 11-12-2008, 03:48 AM   #6
shwetanaik
LQ Newbie
 
Registered: Nov 2008
Posts: 1

Rep: Reputation: 0
how to chnage existing symbolic link

Is anybodu knew how to chnage existing symbolic link?
i have created symbolic link
ln -s <folder> <link folder>
but now i want link another folder to the same link without using unlink command
currenty linkfolder->folder
then i tried ln -s <Another folder> <link folder>
so it should be linkfolder->Another folder
In short i want to override previous link
is there any command for that?
please let me know
 
Old 11-12-2008, 04:06 AM   #7
chipotphe
Member
 
Registered: Nov 2007
Posts: 62

Rep: Reputation: 15
Quote:
Originally Posted by shwetanaik View Post
In short i want to override previous link
is there any command for that?
I have read once something like

"ln -sf source new_link"

maybe this may help
 
  


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
Symbolic Links petercool Linux - General 2 08-20-2003 12:15 PM
Symbolic links bkmesenbrink Linux - Newbie 2 11-13-2002 12:54 PM
Symbolic links pdstatha Programming 1 04-08-2002 10:50 PM
symbolic links winger Linux - General 5 04-06-2002 06:16 PM
Symbolic links Valerie Linux - Newbie 12 03-31-2002 02:49 AM


All times are GMT -5. The time now is 04:34 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration