CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2003
    Location
    Turkey
    Posts
    37

    removing the link(constituded by command "ln") from a file

    I am not experienced in linux shell
    I do the following,

    $rm -rf a
    $ln -sf b a

    and now I want to reverse these commands. I want to remove the link on file a, and I want to gain this file with no loss.

    thank you

  2. #2
    Join Date
    May 2001
    Location
    Germany
    Posts
    1,158
    "ln -s" creates a softlink, meaning the new filename is linked to the old filename, but they are different.
    You can safely "rm" the link:
    rm a

    But be careful: if the link is a hard link, your original file will be deleted!

  3. #3
    Join Date
    May 2000
    Location
    Phoenix, AZ [USA]
    Posts
    1,347
    No offense, but quite frankly, this does not belong in a C++ forum.
    There are plenty of linux/unix forums around.

    --Paul

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured