<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Regarding copying links in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-copying-links/m-p/3482002#M847366</link>
    <description>Varun,&lt;BR /&gt;&lt;BR /&gt;instead of using "cp" use rcp across the servers - this will always copy content instead of the actual link itself.  The reason I know this is b/c I am always *wanting* the link and not what the link is pointing to.  Basically, the opposite problem you have.  So, I have to use tar instead rcp.&lt;BR /&gt;&lt;BR /&gt;Anyways, set up remote shell across the two servers so that they work using .rhosts files.&lt;BR /&gt;&lt;BR /&gt;To get the files onto HP server  from the Sun Server...  (logged onto the HP server).&lt;BR /&gt;&lt;BR /&gt;rcp -rp sunbox:/disk1/stuff_i_want/ /disk1/stuff_i_want/&lt;BR /&gt;&lt;BR /&gt;This should deliver to you all of your files sans symbolic links (with actual files instead).  &lt;BR /&gt;&lt;BR /&gt;HTH</description>
    <pubDate>Wed, 09 Feb 2005 16:44:34 GMT</pubDate>
    <dc:creator>TwoProc</dc:creator>
    <dc:date>2005-02-09T16:44:34Z</dc:date>
    <item>
      <title>Regarding copying links</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-copying-links/m-p/3481995#M847359</link>
      <description>Hi,&lt;BR /&gt;when i am copying some link from one directory to another, i can see it is simply coying it, i mean to say suppose in one directory i have links like file -&amp;gt; ../../file then using command "cp -r" i am trying it to copy into some location and then when i am executing &lt;BR /&gt;" ls -l " at copied location it is simply showing file -&amp;gt; ../../file which has no meaning for copied location(IT IS NOT COPYING ACTUAL CONTENT)&lt;BR /&gt;I will be greatful to listen any reponse on this.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 09 Feb 2005 07:41:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-copying-links/m-p/3481995#M847359</guid>
      <dc:creator>Varun_5</dc:creator>
      <dc:date>2005-02-09T07:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding copying links</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-copying-links/m-p/3481996#M847360</link>
      <description>The problem is with the way in which your original link is defined.  cp is not able to evaluate the link in order to redefine it for your new location - it just copies it as it is.&lt;BR /&gt;&lt;BR /&gt;You should really use the absolute path of the target file when creating a link.</description>
      <pubDate>Wed, 09 Feb 2005 08:43:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-copying-links/m-p/3481996#M847360</guid>
      <dc:creator>Chris Wilshaw</dc:creator>
      <dc:date>2005-02-09T08:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding copying links</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-copying-links/m-p/3481997#M847361</link>
      <description>Varun,&lt;BR /&gt;if the link has been created with a relative path i.e. ../../file , then copying the link will not change the pointer of the link. So the relative path will be maintained.&lt;BR /&gt;Same as creating a ln -s to a file and then moving that target file will not move your link pointer.&lt;BR /&gt;All I can suggest is recreating the link with absolute paths i.e. /&lt;DIR&gt;/&lt;DIR&gt;/file&lt;BR /&gt;Regards&lt;/DIR&gt;&lt;/DIR&gt;</description>
      <pubDate>Wed, 09 Feb 2005 08:46:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-copying-links/m-p/3481997#M847361</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2005-02-09T08:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding copying links</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-copying-links/m-p/3481998#M847362</link>
      <description>Thanks for so quick response, but we r working on porting project from solaris to hp , So we cant change the relative link to absolute link,&lt;BR /&gt;We are able to copy content of link on solaris using sme command " cp -R "&lt;BR /&gt;Is there any other option or way in which we can attain same behaviour on hp .&lt;BR /&gt;Seeking for ur immediate help ,&lt;BR /&gt;Thanks ,&lt;BR /&gt;varun</description>
      <pubDate>Wed, 09 Feb 2005 08:58:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-copying-links/m-p/3481998#M847362</guid>
      <dc:creator>Varun_5</dc:creator>
      <dc:date>2005-02-09T08:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding copying links</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-copying-links/m-p/3481999#M847363</link>
      <description>To copy a symbolic link to a new location, and still have a valid link that points to something, then one way or another, the absolute path must be specified when creating the link.&lt;BR /&gt;If the location of the target file changes depending on the platform , then you could try setting an environment variable with the absolute path of the application's home directory, and create the link using that. e.g.&lt;BR /&gt;in .profile:&lt;BR /&gt;export APPDIR=/path/to/application&lt;BR /&gt;&lt;BR /&gt;Then create the link with:&lt;BR /&gt;ln -s ${APPDIR}/bin/application_exe ./application_exe&lt;BR /&gt;&lt;BR /&gt;You could then copy that symbolic link to anywhere on that machine, and it would still point to the relevant file. You could use the same variable (with a different path) and the same ln command to create a similar link on another platform, and it would work there, but the symbolic links could not be copied between platforms.</description>
      <pubDate>Wed, 09 Feb 2005 09:16:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-copying-links/m-p/3481999#M847363</guid>
      <dc:creator>Gordon  Morrison</dc:creator>
      <dc:date>2005-02-09T09:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding copying links</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-copying-links/m-p/3482000#M847364</link>
      <description>Assuming you still want a symbolic link you need to use the force option:&lt;BR /&gt;&lt;BR /&gt;ln -fs file /full_path/file&lt;BR /&gt;&lt;BR /&gt;Mark Syder (like the drink but spelt different)</description>
      <pubDate>Wed, 09 Feb 2005 09:25:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-copying-links/m-p/3482000#M847364</guid>
      <dc:creator>MarkSyder</dc:creator>
      <dc:date>2005-02-09T09:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding copying links</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-copying-links/m-p/3482001#M847365</link>
      <description>Hi Mark,&lt;BR /&gt;Actually i dont have to create link..&lt;BR /&gt;i have to copy those files beacuse i have to give write permission for those file later on.&lt;BR /&gt;Can you suggest something else.</description>
      <pubDate>Wed, 09 Feb 2005 09:37:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-copying-links/m-p/3482001#M847365</guid>
      <dc:creator>Varun_5</dc:creator>
      <dc:date>2005-02-09T09:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding copying links</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-copying-links/m-p/3482002#M847366</link>
      <description>Varun,&lt;BR /&gt;&lt;BR /&gt;instead of using "cp" use rcp across the servers - this will always copy content instead of the actual link itself.  The reason I know this is b/c I am always *wanting* the link and not what the link is pointing to.  Basically, the opposite problem you have.  So, I have to use tar instead rcp.&lt;BR /&gt;&lt;BR /&gt;Anyways, set up remote shell across the two servers so that they work using .rhosts files.&lt;BR /&gt;&lt;BR /&gt;To get the files onto HP server  from the Sun Server...  (logged onto the HP server).&lt;BR /&gt;&lt;BR /&gt;rcp -rp sunbox:/disk1/stuff_i_want/ /disk1/stuff_i_want/&lt;BR /&gt;&lt;BR /&gt;This should deliver to you all of your files sans symbolic links (with actual files instead).  &lt;BR /&gt;&lt;BR /&gt;HTH</description>
      <pubDate>Wed, 09 Feb 2005 16:44:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-copying-links/m-p/3482002#M847366</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2005-02-09T16:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding copying links</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-copying-links/m-p/3482003#M847367</link>
      <description>Hi Varun&lt;BR /&gt;&lt;BR /&gt;U can use tar for the same.&lt;BR /&gt;&lt;BR /&gt;1) tar -cvf &lt;SOME destnation="" in="" local=""&gt; &lt;DIRECTORY to="" be="" copied=""&gt;&lt;BR /&gt;2)copy the tar file to the other sun server &lt;BR /&gt;3)extract the same&lt;BR /&gt;tar -xvf &lt;TAR archive=""&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps&lt;BR /&gt;&lt;BR /&gt;Rgds&lt;BR /&gt;suraj&lt;/TAR&gt;&lt;/DIRECTORY&gt;&lt;/SOME&gt;</description>
      <pubDate>Thu, 10 Feb 2005 02:41:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-copying-links/m-p/3482003#M847367</guid>
      <dc:creator>Suraj_2</dc:creator>
      <dc:date>2005-02-10T02:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding copying links</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-copying-links/m-p/3482004#M847368</link>
      <description>Hi Suraj,&lt;BR /&gt;That i am doing , Actually for that tarcvf will not solve our purpose but "tar -cvhf" will do that, but i was actually interested in knowing any option available with cp.&lt;BR /&gt;Thanks for your suggestion.&lt;BR /&gt;</description>
      <pubDate>Thu, 10 Feb 2005 03:41:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-copying-links/m-p/3482004#M847368</guid>
      <dc:creator>Varun_5</dc:creator>
      <dc:date>2005-02-10T03:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding copying links</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-copying-links/m-p/3482005#M847369</link>
      <description>I was able to accomplish this via the following on a HPUX machine  using  find and cpio: &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;find . -follow -depth -print |cpio -pdmh /usr/tmpi/tmp1&lt;BR /&gt;&lt;BR /&gt;The above copies the data in the current directory (that contains symbolic links) to new temporary location populating it with the source files files (no links)&lt;BR /&gt;&lt;BR /&gt;To transfer a directory tree to another system:&lt;BR /&gt;find . -follow -depth -print |cpio -oh &amp;gt; /tmp/file.out&lt;BR /&gt;&lt;BR /&gt;then transfer file.out to the new location&lt;BR /&gt;from the destination directory use&lt;BR /&gt;cpio -idm &amp;lt; file.out &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Your plan seems reasonable. You might have some problems,  If your source directory tree has several symbolic links to the same source file. Transfering your data to the new system might cause data syncronation problems. Where a future file change updates one and not the other.  Symbolic links solve this problem.  My  advice is do "find . -type l -print" , to see if you have some several links pointing to the same data.  If you do, after the move, it should be simple enough to true up the few files you might find.&lt;BR /&gt;&lt;BR /&gt;Good Luck&lt;BR /&gt;Rory&lt;BR /&gt;</description>
      <pubDate>Thu, 10 Feb 2005 11:35:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-copying-links/m-p/3482005#M847369</guid>
      <dc:creator>Rory R Hammond</dc:creator>
      <dc:date>2005-02-10T11:35:27Z</dc:date>
    </item>
  </channel>
</rss>

