Announcement

Collapse
No announcement yet.

creating links to to directories through command line and through konquerer

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    creating links to to directories through command line and through konquerer

    Hi,
    I want to create a link under my home folder that points to a folder on a mounted NAS device. So, for example, I want /home/music to point to /mnt/linkstation/music

    I notice there is a command line option ln. But I'm not sure whether directory links are treated differently than file links, and if I need to use different options. I assume I would want to open terminal and enter
    Code:
    ln -T /mnt/linkstation/music /music
    Although I don't know whether I need to include the "/" before music or not, or whether the folder /home/music needs to exist first of not. I also notice that ln has an option for symbolic vs hard. Which would I want to use in this case? What's the difference?

    And as if those questions weren't enough, I was also wondering how I would do this directly through konquerer? I notice that if I right click I can select create new -> link to location (url) OR link to application OR link to Device (lots of sub-options). But I have no clue which is the one I would want to use.

    Thanks in advance!
    -aleska

    #2
    Re: creating links to to directories through command line and through konquerer

    [quote=aleska]
    I want /home/music to point to /mnt/]

    Code:
    ln -s /mnt/linkstation/music /home/music
    Further reading: man ln , hard vs. "soft" links

    Comment


      #3
      Re: creating links to to directories through command line and through konquerer

      Originally posted by aleska
      I assume I would want to open terminal and enter
      Code:
      ln -T /mnt/linkstation/music /music
      Errr... no

      Code:
      $ ln -s /mnt/linkstation/music ~/music
      Although I don't know whether I need to include the "/" before music
      It depends. All the unix file structure starts in "/". Also called root directory.

      So /home means the home dir in the root "/".

      If you write ln -s /mnt/linkstation/music /music that will mean. Link the /mnt/linkstation/music dir to a dir called music in the root directory. That will likely fail, as normal users don't have permission to use the root dir.

      If you don't use the / in front of music the path will be relative. I mean ln -s /mnt/linkstation/music music will link that dir into a new dir called musin in whatever dir you are now.

      Finally ~ means your home dir. So ~/music/ means a dir called music in my home dir

      or not, or whether the folder /home/music needs to exist first of not.
      It should not exist.

      I also notice that ln has an option for symbolic vs hard. Which would I want to use in this case?
      You allways want symbolic links. Really.

      What's the difference?
      http://en.wikipedia.org/wiki/Hard_link

      And as if those questions weren't enough, I was also wondering how I would do this directly through konquerer? I notice that if I right click I can select create new -> link to location (url) OR link to application OR link to Device (lots of sub-options). But I have no clue which is the one I would want to use.
      No one . All of them will create .desktop files, that are similar to windows shorcuts. Not real links.

      Just drag and drop one folder to some place. You will be given 3 options, copy it, move it and link it. Just choose link.

      Javier.

      Comment


        #4
        Re: creating links to to directories through command line and through konquerer

        Ohhh.. beaten by that horse again .

        BTW, Do you really want to make a link to /home/music or really to /home/myuser/music?

        I have assumed the second one.

        Javier.

        Comment


          #5
          Re: creating links to to directories through command line and through konquerer

          Excellent! Many thanks!

          Comment


            #6
            Re: creating links to to directories through command line and through konquerer

            Originally posted by javierrivera
            beaten by that horse again
            Rather "kicked"

            Comment


              #7
              Re: creating links to to directories through command line and through konquerer

              Naaaa... you get better BAB and damage with the horn:

              http://www.d20srd.org/srd/monsters/unicorn.htm

              Javier.

              Comment


                #8
                Re: creating links to to directories through command line and through konquerer

                I prefer Shakespeare (in particular: "The Tempest"):
                "Now I will believe that there are unicorns" ... :P

                [img width=400 height=267]http://www.arlekin.ch/freyja.jpg[/img]

                Comment

                Working...
                X