Operating System - HP-UX
1757813 Members
2944 Online
108863 Solutions
New Discussion юеВ

Symbolic links in packaging

 
SOLVED
Go to solution
Paul Danielski
New Member

Symbolic links in packaging

Is there copy command that breaks symbolic links during the copy?
4 REPLIES 4
harry d brown jr
Honored Contributor

Re: Symbolic links in packaging

Are you asking if there is a program that will copy the actual file that the symbolic link is pointing to? If so, you can use the "-h" option on tar or cpio.
Live Free or Die
Madhu Sudhan_1
Respected Contributor

Re: Symbolic links in packaging

Paul!
When ever you make a copy, the source attributes (other than accesstime) is not modified. If you are looking for
1) a version/option that should break the symbolic link of the source and if the source is a symbolic link, then you need to write script to do it.
2) by default when a copy is made from a symbolic link (source), target will not be a symbolic link. It will be a regular file. I think this what you are looing at.

Hope this helps.
Thanks,
...Madhu
Think Positive
James R. Ferguson
Acclaimed Contributor
Solution

Re: Symbolic links in packaging

Hi Paul:

For 'fbackup' you can use the 's-' option which will backup the object that a symbolic link refers to rather than backup the symbolic link (the default behavior).

For 'tar' and 'cpio' the '-h' option controls how symbolic links are treated.

...JRF...
Paul Danielski
New Member

Re: Symbolic links in packaging

Thanks for the help!