Click to See Complete Forum and Search --> : removing the link(constituded by command "ln") from a file


serbet
May 13th, 2003, 01:48 AM
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

Richard.J
May 13th, 2003, 04:21 AM
"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!

PaulWendt
May 13th, 2003, 06:11 AM
No offense, but quite frankly, this does not belong in a C++ forum.
There are plenty of linux/unix forums around.

--Paul