On the topic of soft links creation

Problem completing one of the interactive tutorials?

Moderator: drgrussell

Post Reply
medinita3586

On the topic of soft links creation

Post by medinita3586 » Thu Feb 12, 2015 1:58 am

Hello, I am here stuck in the Linux solar system again, trying to answer question 8 on the tutorial 3 which requires of me to create a soft link file named "mylink" that points to the file "home/demo/thismonth" file and after many unsuccessful commands, I have almost come to the completion of this problem but... I am not there yet, not quite.

I am now doing: "ln -s home/demo/thismonth /home/demo/work/programs/mylink" and when I check the result, it passes the first two questions but seems like I am not making my soft link called "mylink" point to the "thismonth" file, why? What am I doing wrong?

Sorry but I am stuck and would love to continue on my journey to the Linux Nirvana.

Thanks in advance. :cry: :shock:

drgrussell
Site Admin
Posts: 426
Joined: Sat Feb 12, 2005 8:57 pm
Are you a robot or a human?: Human

Re: On the topic of soft links creation

Post by drgrussell » Fri Feb 13, 2015 11:34 am

If your link is /home/demo/work/programs/mylink, and you add your "relative" link to that, then this will point to
/home/demo/work/programs/home/demo/thismonth
In short, the link is appended to the location of the link when you use relative linking.
In fact you need to go up the tree two levels from programs to find thismonth relatively.
Not only that, there is no "Programs" directory... do you mean progs?

so not "home/demo/thismonth" but "../../thismonth".

medinita3586

Re: On the topic of soft links creation

Post by medinita3586 » Sat Feb 14, 2015 2:44 am

Actually I meant "progs", I will try that as soon as I can.

Thank you very much :P

medinita3586

Re: On the topic of soft links creation

Post by medinita3586 » Sun Feb 15, 2015 8:00 pm

Alright, that really works! So that that command gives: "../../thismonth /home/demo/work/progs/mylink " the relative path to the "thismonth" file, right? I had no idea you could use the "../" command that way. And it also makes the "mylink" file point to the "thismonth" file, doesn't it? Very interesting, I could not have figure that out on my own, really. That stuff of moving from directory to directory using relative paths have been bugging me ever since I started learning Linux

Thank you so much... :lol:

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests