[LBo] Re: Symlink peculiarities (Anerobe)

Anerobe anerobe at yahoo.com
Tue Jan 9 04:58:20 CET 2007


Collin Park wrote:

>> Finally I COPIED the functioning symlink from the documents folder...
>> 
>> cp mysymlnk ~/Desktop/
>> 
>> This created a Desktop symlink which DID open the document. HURRAH!
> 
> Whoa. did it really?  On my box, it doesn't copy the symlink; it
> copies the file instead:
> 
>     collin at p3:~> cd documents/
>     collin at p3:~/documents> ln -s myfile.odt mysymlnk
>     collin at p3:~/documents> cp mysymlnk ../Desktop/
>     collin at p3:~/documents> cd -
>     /home/collin
>     collin at p3:~> ls -l Desktop/mysymlnk
>     -rw-r--r--  1 collin users 0 2007-01-08 06:59 Desktop/mysymlnk
>     collin at p3:~>
> 
>> Finally I renamed the working symlink on my Desktop... the padlock
>> reappeared and the link no longer functioned.
> 
> That's bizarre.  Could you snarf'n'barf (or copy/paste) the cmds used?
> I cannot get the "cp" command (I'm using SuSE 9.3) to actually copy a
> symlink; it seems to always copy the file.  This is the case even when
> I say "cp -p".

I tried to repeat the link copy...

cp mysymlnk ~/Desktop/

You are correct. It copied the file, not the link. I missed that completely.
And (obviously), I cannot account for the statement that renaming the link
(which apparently was a file copy) reverted to a padlocked icon. This was a
"memory error" (mine).

Your comments and illustrations are helpful.



More information about the QnA mailing list