From: Diego Z. <za...@ce...> - 2001-01-30 19:35:37
|
dg...@ta... said: > This is exactly what GNU cp does. It only dereferences the link if you > use the -L option. Not here. cp (from fileutils-4.0) does copy the contents of the symlink, without any additional options. So does /bin/cp (Solaris 2.7). > cp *doesn't*, however, modify relative links so that the new link > still points to the right file. Would this be useful to have? I still believe that the correct behavior should be to copy the contents of the file. After all, that's what links (symbolic or hard) are for: to provide you an alternative access point to the file. When I open a symlink using vi, or any other program, it's the contents of the destination file I get, not some representation of the link. Why should cp be different? However, if a difference must be made, I guess something that creates a new symlink, but fixing it appropriately, would be OK. --Diego |