No, i guess i didn't explain it clearly enough. i don't want to remove the link target. i want to replace the link with a copy of the target.
If fileA has the contents "Hello", and then i created links like this:
Code:
dstar@space:~$ ln -s fileA fileB
dstar@space:~$ ln fileA fileC
dstar@space:~$ ls -l
... fileA
... fileB -> fileA
... fileC
dstar@space:~$
Then i did something:
Code:
dstar@space:~$ something fileB
dstar@space:~$ something fileC
dstar@space:~$ ls -l
... fileA
... fileB
... fileC
dstar@space:~$
See that fileB is no longer a link. And then if i edit fileA to say "Goodbye", neither fileB nor fileC are affected, because they're not links anymore:
Code:
dstar@space:~$ cat fileA
Goodbye
dstar@space:~$ cat fileB
Hello
dstar@space:~$ cat fileC
Hello
dstar@space:~$
i want to know what that "something" command would be. Whatever it is, "something <file>" is functionally the same as "cp <file> xxx && rm <file> && mv xxx <file>". Not "rm <whatever file links to>".
Bookmarks