Find the answer to your Linux question:
Results 1 to 4 of 4
I created a symlink to a directory. Now how to rename the symlink to something else pointing to the same directory....
  1. #1
    Linux User vickey_20's Avatar
    Join Date
    Mar 2009
    Location
    Mumbai, India
    Posts
    493

    how to rename a link

    I created a symlink to a directory. Now how to rename the symlink to something else pointing to the same directory.
    Only if I could understand the man pages
    Registered Linux user #492640
    OS: RHEL4,5 ,RH 9,Ubuntu

  2. #2
    Linux Newbie
    Join Date
    Mar 2009
    Posts
    228
    With the 'mv' command:

    Code:
    mv oldsymlink newsymlink

  3. #3
    Linux User vickey_20's Avatar
    Join Date
    Mar 2009
    Location
    Mumbai, India
    Posts
    493
    I tried a cp on the symlink but it didn't work. I ll give mv a try . Thanks for replying dude
    Only if I could understand the man pages
    Registered Linux user #492640
    OS: RHEL4,5 ,RH 9,Ubuntu

  4. #4
    Linux User vickey_20's Avatar
    Join Date
    Mar 2009
    Location
    Mumbai, India
    Posts
    493
    got the solution and it cleared my concepts too
    cmd: cp linkname to newlink
    note: when you type the linkname and press tab incase it's a dir link it will be appended with '/' where you will get a error. To rename a dir symlink simply remove the / form the end.
    Only if I could understand the man pages
    Registered Linux user #492640
    OS: RHEL4,5 ,RH 9,Ubuntu

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...