<?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: Determine soft link directory in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/determine-soft-link-directory/m-p/3196430#M792124</link>
    <description>Hi Amit,&lt;BR /&gt;&lt;BR /&gt;You can use pwd for dir that includes softlink dir and /bin/pwd for real location.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;&lt;BR /&gt;Gideon&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 19 Feb 2004 06:08:08 GMT</pubDate>
    <dc:creator>G. Vrijhoeven</dc:creator>
    <dc:date>2004-02-19T06:08:08Z</dc:date>
    <item>
      <title>Determine soft link directory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/determine-soft-link-directory/m-p/3196425#M792119</link>
      <description>Location of D is /temp/&lt;BR /&gt;I have a soft link pointing from /A/B/C-&amp;gt; D. &lt;BR /&gt;&lt;BR /&gt;I execute the command cd /A/B/C to login to directory D.&lt;BR /&gt;&lt;BR /&gt;If I execute the dirname /A/B/C I get the o/p as /A/B. But the requirement that I need is the actually location of D. &lt;BR /&gt;&lt;BR /&gt;Is there any simple way of doing this?</description>
      <pubDate>Thu, 19 Feb 2004 05:10:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/determine-soft-link-directory/m-p/3196425#M792119</guid>
      <dc:creator>Amrit_1</dc:creator>
      <dc:date>2004-02-19T05:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: Determine soft link directory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/determine-soft-link-directory/m-p/3196426#M792120</link>
      <description>#ln -s /temp/d /a/b/c&lt;BR /&gt;&lt;BR /&gt;# cd /a/b/c&lt;BR /&gt;This will now point to temp/d&lt;BR /&gt;&lt;BR /&gt;Here c is link which points to /temp/d</description>
      <pubDate>Thu, 19 Feb 2004 05:19:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/determine-soft-link-directory/m-p/3196426#M792120</guid>
      <dc:creator>T G Manikandan</dc:creator>
      <dc:date>2004-02-19T05:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: Determine soft link directory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/determine-soft-link-directory/m-p/3196427#M792121</link>
      <description>dirname will only extract portions of path names.&lt;BR /&gt;&lt;BR /&gt;So to get what you need I afraid you have to give $dirname /temp/D only.&lt;BR /&gt;&lt;BR /&gt;sks</description>
      <pubDate>Thu, 19 Feb 2004 05:37:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/determine-soft-link-directory/m-p/3196427#M792121</guid>
      <dc:creator>Sanjay Kumar Suri</dc:creator>
      <dc:date>2004-02-19T05:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: Determine soft link directory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/determine-soft-link-directory/m-p/3196428#M792122</link>
      <description>I shall explain the problem a bit more in detail: &lt;BR /&gt;&lt;BR /&gt;In the script I have a default location: /A/B/C. The user has the option of creating a directory /temp/D. If this done from the default there is a softlink pointing to the non-default.&lt;BR /&gt;&lt;BR /&gt;Now the script recognizes only the default and not the non default. I need to get the softlink path so that I populate the parent directory of the softlink i.e. /temp directory.&lt;BR /&gt;&lt;BR /&gt;One option is do a ll -ls -&amp;gt; grep "directory" -&amp;gt; awk NF to get the exact path of the soft link and then do dirname path&lt;BR /&gt;&lt;BR /&gt;But the above is cumbersome and is round about method. Is there any faster method of accessing.</description>
      <pubDate>Thu, 19 Feb 2004 05:59:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/determine-soft-link-directory/m-p/3196428#M792122</guid>
      <dc:creator>Amrit_1</dc:creator>
      <dc:date>2004-02-19T05:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: Determine soft link directory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/determine-soft-link-directory/m-p/3196429#M792123</link>
      <description>lt09:/tmp 105 &amp;gt; ln -s /A/B/D D&lt;BR /&gt;lt09:/tmp 106 &amp;gt; perl -le'print readlink for @ARGV' D&lt;BR /&gt;/A/B/D&lt;BR /&gt;lt09:/tmp 107 &amp;gt;&lt;BR /&gt;&lt;BR /&gt;This does *NOT* guarantee that the target folder does exist. It is still a symbolic link&lt;BR /&gt;&lt;BR /&gt;lt09:/tmp 107 &amp;gt; ln -s /usr/tmp E&lt;BR /&gt;lt09:/tmp 108 &amp;gt; perl -MCwd -le'print Cwd::realpath $_ for @ARGV' D E&lt;BR /&gt;&lt;BR /&gt;/var/tmp&lt;BR /&gt;lt09:/tmp 109 &amp;gt;&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Thu, 19 Feb 2004 06:07:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/determine-soft-link-directory/m-p/3196429#M792123</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2004-02-19T06:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: Determine soft link directory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/determine-soft-link-directory/m-p/3196430#M792124</link>
      <description>Hi Amit,&lt;BR /&gt;&lt;BR /&gt;You can use pwd for dir that includes softlink dir and /bin/pwd for real location.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;&lt;BR /&gt;Gideon&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Feb 2004 06:08:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/determine-soft-link-directory/m-p/3196430#M792124</guid>
      <dc:creator>G. Vrijhoeven</dc:creator>
      <dc:date>2004-02-19T06:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: Determine soft link directory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/determine-soft-link-directory/m-p/3196431#M792125</link>
      <description>I want the implementation in unix scripting and not in perl. thanks for that info.&lt;BR /&gt;&lt;BR /&gt;I tried doing a pwd on /A/B/C. The output is /A/B/C and not what I wanted i.e. the location D.&lt;BR /&gt;&lt;BR /&gt;Please let me know in case I have misunderstood the explaination.</description>
      <pubDate>Thu, 19 Feb 2004 07:14:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/determine-soft-link-directory/m-p/3196431#M792125</guid>
      <dc:creator>Amrit_1</dc:creator>
      <dc:date>2004-02-19T07:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: Determine soft link directory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/determine-soft-link-directory/m-p/3196432#M792126</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Previous tip should work :&lt;BR /&gt;&lt;BR /&gt;$ ls -l SdDD&lt;BR /&gt;lrwxr-xr-x 1 phelix CST 12 Feb 22 2003 SdDD -&amp;gt; /homeHA/SdDD&lt;BR /&gt;$ A=$(cd SdDD ; pwd)&lt;BR /&gt;$ B=$(dirname $(cd SdDD ; pwd))&lt;BR /&gt;$ echo $A $B&lt;BR /&gt;/homeHA/phelix/SdDD /homeHA/phelix&lt;BR /&gt;$ A=$(cd SdDD ; /usr/bin/pwd)&lt;BR /&gt;$ B=$(dirname $(cd SdDD ; /usr/bin/pwd))&lt;BR /&gt;$ echo $A $B&lt;BR /&gt;/homeHA/SdDD /homeHA&lt;BR /&gt;&lt;BR /&gt;The only problem is if the target sym link doesn't exist ...&lt;BR /&gt;&lt;BR /&gt;Regards.&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Feb 2004 09:11:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/determine-soft-link-directory/m-p/3196432#M792126</guid>
      <dc:creator>Jean-Louis Phelix</dc:creator>
      <dc:date>2004-02-19T09:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: Determine soft link directory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/determine-soft-link-directory/m-p/3196433#M792127</link>
      <description>Don't use the default pwd. It might use the shell buitltin, which doesn't work like you want. Use /bin/pwd to make sure you get the real working dir.</description>
      <pubDate>Thu, 19 Feb 2004 09:19:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/determine-soft-link-directory/m-p/3196433#M792127</guid>
      <dc:creator>Elmar P. Kolkman</dc:creator>
      <dc:date>2004-02-19T09:19:43Z</dc:date>
    </item>
  </channel>
</rss>

