problem using ln with command line
I'm trying to create a symbolic link using ln. I used ln as per the man page, it creates the link and show up when I look in the directory, BUT when I try to change dir, it comes up with "bash: cd: linux: No such file or directory". When I look at the file structure in Konqueror, it shows the link name but the file type is unknown and has 0 bytes. When I was last mucking around with mdk 9.2 I'm sure the link showned up as a folder? I What am I doing wrong.
:scratch: |
The basic usage (for symbolic links) is: ln -s <original> <new_link> or to give a real-world example: ln -s /usr/src/linux-2.6.6-mm1 /usr/src/linux to create a link in /usr/src called "linux" and pointing to the /usr/src/linux-2.6.6-mm1 directory.
Also, if you want to make a quick link with the same name as the original file or directory in your current working directory you could just type ln -s <target>. The most probable cause in your case is that you simply created the link wrong. Did you test it in the console? Type ls -l <link> to see where a link points to. Example: Code:
hw@baron:~$ cd /usr/src Håkan |
I've tried
"ln -s linux2.6.6mod linux" and got "lrwxrwxrwx 1 root root 13 Apr 19 21:39 linux -> linux2.6.6mod", then I tried "ln -s linux2.6.6mod/ linux" and got "lrwxrwxrwx 1 root root 14 Apr 19 21:40 linux -> linux2.6.6mod/", neither worked. I also tried the full directories like "ln -s /usr/src/linux2.6.6mod/ /usr/src/linux" and it still doesn't work. Any idea's. |
Reply
Let me just start off by saying I'm a newbie but maybe this will point you in the right direction. I also had a problem with a file like that while installing qmail. I don't think your link is the problem and the reason you are an error is because the file hasn't been converted to an executable format yet. When I was intalling Qmail I found that after I typed in a command it didn't work. I used the "file" command to find out what it was and it wasn't recognised. I realised that I had missed the "make && make install" command so that the file was just a dormant file and hadn't been compiled yet (if compiled is the right terminology for this process).
Hope this helps. |
Thanks hw-tph. I mucked around a bit more and now it work, Newbie error.
|
All times are GMT -5. The time now is 03:00 AM. |