The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

symlink help

Discussion in 'General Discussion' started by silvernetuk, Apr 5, 2003.

  1. silvernetuk

    silvernetuk Well-Known Member

    Joined:
    Sep 2, 2002
    Messages:
    311
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    United Kingdom
    Hi,

    When setting up a symlink in SSH do you need access to the dir you symlink to ?

    Regards,
    Garry
     
  2. remal

    remal Member

    Joined:
    Mar 19, 2003
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    nope

    ex:1
    im in /home/duy as u can see
    Code:
    root@server [/home/duy]# ln -s /etc/passwd /tmp/test/passwdLnk
    root@server [/home/duy]# ls -al /tmp/test/
    total 8
    drwxr-xr-x    2 root     root         4096 Apr  6 01:54 ./
    drwxrwxrwt    3 root     root         4096 Apr  6 01:53 ../
    lrwxrwxrwx    1 root     root           11 Apr  6 01:54 passwdLnk -> /etc/passwd
    root@montada [/home/duy]# 
    


    ex2:
    im in /tmp/test now
    Code:
    root@server [/tmp/test]# ln -s /etc/passwd passwdLnk
    root@server [/tmp/test]# ls -al
    total 8
    drwxr-xr-x    2 root     root         4096 Apr  6 01:55 ./
    drwxrwxrwt    3 root     root         4096 Apr  6 01:54 ../
    lrwxrwxrwx    1 root     root           11 Apr  6 01:55 passwdLnk -> /etc/passwd
    root@server [/tmp/test]# 
    



    they all the same
     
  3. silvernetuk

    silvernetuk Well-Known Member

    Joined:
    Sep 2, 2002
    Messages:
    311
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    United Kingdom
    Hi,

    Thank you for the example :D

    So how do these symlinks work are they like a windows shortcut ?

    Regards,
    Garry
     
Loading...

Share This Page