Just a brief history on what I have been doing, I trying to make some stand alone applications like abiword, gaim, pan etc.. for a mini version of slackware 10.0. I can find all the shared libraries by using the
ldd command no problem but when it comes to copying them, that's where the problems start.
When using a script if I use
cp or
rsync I can only either copy the symlink and not the target file of the symlink, or it creates the symlink as the target file. But I eventually found a way around it with the
cp command.
For an example if I want to copy
/lib/ld-linux.so.2 which is a symlink to
/lib/ld-2.3.2.so the command to use would be:
Code:
cp -R /lib/ld-linux.so.2 /some/directory
cp -H /lib/ld-linux.so.2 /some/directory
I found that the
-R switch would copy the symlink only and then the
-H switch would then copy only the target file. I tried it with both switches on the same line:
Code:
cp -HR /lib/ld-linux.so.2 /some/directory
In a few combinations but found it would not work, not too sure how much a tip this is, but thought if any one was out there trying to do something similar it may help you out some what. I tried googling a few days but could not find any info to successfully copying symlinks and their targets.