<?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: Finding hardlinked file. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-hardlinked-file/m-p/2438264#M6176</link>
    <description>Eric,&lt;BR /&gt;how about something like:&lt;BR /&gt;&lt;BR /&gt;dev=`devnm .| cut -d' ' -f1`&lt;BR /&gt;ls -i1 * | while read inum name ; do echo $name; ncheck -a -i $inum $dev ";"; done&lt;BR /&gt;&lt;BR /&gt;that should find all hardlinks of all files in your working directory.&lt;BR /&gt;HTH,&lt;BR /&gt;   Wodisch</description>
    <pubDate>Tue, 22 Aug 2000 20:18:25 GMT</pubDate>
    <dc:creator>Wodisch</dc:creator>
    <dc:date>2000-08-22T20:18:25Z</dc:date>
    <item>
      <title>Finding hardlinked file.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-hardlinked-file/m-p/2438260#M6172</link>
      <description>&lt;BR /&gt;I want to list all files in a directory that is hardlinked to any other files anywhere in my system.  Is there a simple command to do that besides writing a script?&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Mon, 21 Aug 2000 18:22:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-hardlinked-file/m-p/2438260#M6172</guid>
      <dc:creator>echong</dc:creator>
      <dc:date>2000-08-21T18:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Finding hardlinked file.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-hardlinked-file/m-p/2438261#M6173</link>
      <description>find / -name -exec ls -F |grep @ {} ;&lt;BR /&gt;(see man ls, F option).</description>
      <pubDate>Mon, 21 Aug 2000 18:26:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-hardlinked-file/m-p/2438261#M6173</guid>
      <dc:creator>Antoanetta Naghiu</dc:creator>
      <dc:date>2000-08-21T18:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: Finding hardlinked file.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-hardlinked-file/m-p/2438262#M6174</link>
      <description>Eric, i can give you what I know. The difference between the listing of a hard link vs a soft link is in the second field of a long list. The second field shows you the number of links if any. &lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;&lt;BR /&gt;#touch /tmp/test&lt;BR /&gt;#ll /tmp/test&lt;BR /&gt;-rw-rw-r--  1 root sys   0 Aug 21 15:26 test&lt;BR /&gt;&lt;BR /&gt;#ln /tmp/test /tmp/test5&lt;BR /&gt;#ll /tmp/test*&lt;BR /&gt;-rw-rw-r-- 2 root sys   0 Aug 21 15:26 test&lt;BR /&gt;-rw-rw-r-- 2 root sys   0 Aug 21 15:26 test5&lt;BR /&gt;&lt;BR /&gt;Notice field 2 changed from 1 to 2. You know that a hard link has been created and there are now 2 filenames pionting to the same data.&lt;BR /&gt;&lt;BR /&gt;I won't get into using this info in a script but just thought I would share it.&lt;BR /&gt;&lt;BR /&gt;Tony&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 21 Aug 2000 18:36:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-hardlinked-file/m-p/2438262#M6174</guid>
      <dc:creator>Anthony deRito</dc:creator>
      <dc:date>2000-08-21T18:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: Finding hardlinked file.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-hardlinked-file/m-p/2438263#M6175</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Hard linked files must always be on the same file system.&lt;BR /&gt;&lt;BR /&gt;First, determine the inode number of the file for which you want to determine the hard linked files:&lt;BR /&gt;&lt;BR /&gt;ls -i your_filename&lt;BR /&gt;&lt;BR /&gt;The inode is listed.&lt;BR /&gt;&lt;BR /&gt;Then, use find to find all files having that same inode number:&lt;BR /&gt;&lt;BR /&gt;find /your/directory -xdev -inum your_inode&lt;BR /&gt;&lt;BR /&gt;That should do the trick.&lt;BR /&gt;&lt;BR /&gt;Bye,&lt;BR /&gt;Rik.</description>
      <pubDate>Mon, 21 Aug 2000 20:07:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-hardlinked-file/m-p/2438263#M6175</guid>
      <dc:creator>RikTytgat</dc:creator>
      <dc:date>2000-08-21T20:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: Finding hardlinked file.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-hardlinked-file/m-p/2438264#M6176</link>
      <description>Eric,&lt;BR /&gt;how about something like:&lt;BR /&gt;&lt;BR /&gt;dev=`devnm .| cut -d' ' -f1`&lt;BR /&gt;ls -i1 * | while read inum name ; do echo $name; ncheck -a -i $inum $dev ";"; done&lt;BR /&gt;&lt;BR /&gt;that should find all hardlinks of all files in your working directory.&lt;BR /&gt;HTH,&lt;BR /&gt;   Wodisch</description>
      <pubDate>Tue, 22 Aug 2000 20:18:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-hardlinked-file/m-p/2438264#M6176</guid>
      <dc:creator>Wodisch</dc:creator>
      <dc:date>2000-08-22T20:18:25Z</dc:date>
    </item>
  </channel>
</rss>

