<?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 Perl: retrieve link info ?? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-retrieve-link-info/m-p/2949062#M720087</link>
    <description>Hi There,&lt;BR /&gt;&lt;BR /&gt;Hope to be allowed to ask a perl question.&lt;BR /&gt;I can use stat() or lstat() to retrieve info about the file, but I have the following problem.&lt;BR /&gt;&lt;BR /&gt;lstat($file) --&amp;gt; tells me all the info of the link&lt;BR /&gt;stat($file) --&amp;gt; tells me all the info the file it is linked to&lt;BR /&gt;&lt;BR /&gt;But who do I find out what file it is linked to (in Perl)????&lt;BR /&gt;I do not want to find out using a syscal such as ; $f_info=`/usr/bin/ll $file`;&lt;BR /&gt;As this is eating resources. Anybody aware of a perl solution for getting the target fname ??&lt;BR /&gt;&lt;BR /&gt;Regs David</description>
    <pubDate>Fri, 11 Apr 2003 09:03:37 GMT</pubDate>
    <dc:creator>David_246</dc:creator>
    <dc:date>2003-04-11T09:03:37Z</dc:date>
    <item>
      <title>Perl: retrieve link info ??</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-retrieve-link-info/m-p/2949062#M720087</link>
      <description>Hi There,&lt;BR /&gt;&lt;BR /&gt;Hope to be allowed to ask a perl question.&lt;BR /&gt;I can use stat() or lstat() to retrieve info about the file, but I have the following problem.&lt;BR /&gt;&lt;BR /&gt;lstat($file) --&amp;gt; tells me all the info of the link&lt;BR /&gt;stat($file) --&amp;gt; tells me all the info the file it is linked to&lt;BR /&gt;&lt;BR /&gt;But who do I find out what file it is linked to (in Perl)????&lt;BR /&gt;I do not want to find out using a syscal such as ; $f_info=`/usr/bin/ll $file`;&lt;BR /&gt;As this is eating resources. Anybody aware of a perl solution for getting the target fname ??&lt;BR /&gt;&lt;BR /&gt;Regs David</description>
      <pubDate>Fri, 11 Apr 2003 09:03:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-retrieve-link-info/m-p/2949062#M720087</guid>
      <dc:creator>David_246</dc:creator>
      <dc:date>2003-04-11T09:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Perl: retrieve link info ??</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-retrieve-link-info/m-p/2949063#M720088</link>
      <description>Hi David,&lt;BR /&gt;&lt;BR /&gt;the perl function "readlink" will return a string indicating the target of the symbolic link. This may be a relative path from the link location or an absolute path depending upon how the link was set up.&lt;BR /&gt;"man perlfunc" gives you basic info on how to use it.&lt;BR /&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;Stephen</description>
      <pubDate>Fri, 11 Apr 2003 09:45:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-retrieve-link-info/m-p/2949063#M720088</guid>
      <dc:creator>Stephen Burkwood</dc:creator>
      <dc:date>2003-04-11T09:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: Perl: retrieve link info ??</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-retrieve-link-info/m-p/2949064#M720089</link>
      <description>perl questions are always welcome.&lt;BR /&gt;&lt;BR /&gt;readlink () gives you the first level of symbolic links. If the target is (again) a symlink, you'd better use the Cwd module:&lt;BR /&gt;&lt;BR /&gt;use Cwd 'abs_path';&lt;BR /&gt;my $abs_path = abs_path($file);&lt;BR /&gt;&lt;BR /&gt;# man Cwd&lt;BR /&gt;&lt;BR /&gt;for the full description&lt;BR /&gt;&lt;BR /&gt;Enjoy, have FUN! H.Merijn&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Apr 2003 09:51:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-retrieve-link-info/m-p/2949064#M720089</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2003-04-11T09:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: Perl: retrieve link info ??</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-retrieve-link-info/m-p/2949065#M720090</link>
      <description>Stephen,&lt;BR /&gt;&lt;BR /&gt;Perfect !!! I just couldn't find it.&lt;BR /&gt;&lt;BR /&gt;my $link_target = readlink($link_file);&lt;BR /&gt;&lt;BR /&gt;print "File $link_file is linked to $link_target \n";&lt;BR /&gt;&lt;BR /&gt;Great !!!&lt;BR /&gt;&lt;BR /&gt;Regs David</description>
      <pubDate>Fri, 11 Apr 2003 09:56:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-retrieve-link-info/m-p/2949065#M720090</guid>
      <dc:creator>David_246</dc:creator>
      <dc:date>2003-04-11T09:56:23Z</dc:date>
    </item>
  </channel>
</rss>

