<?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: File::find question in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/file-find-question/m-p/4976423#M783753</link>
    <description>Thanks everyone for your help.</description>
    <pubDate>Tue, 02 May 2006 10:48:52 GMT</pubDate>
    <dc:creator>Ridzuan Zakaria</dc:creator>
    <dc:date>2006-05-02T10:48:52Z</dc:date>
    <item>
      <title>File::find question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-find-question/m-p/4976419#M783749</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I would like to use File::find to traverse a directory tree find files but would like to skip some of suddirectories under that directory.&lt;BR /&gt;&lt;BR /&gt;How do I do this using File::find?&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Mon, 01 May 2006 15:55:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-find-question/m-p/4976419#M783749</guid>
      <dc:creator>Ridzuan Zakaria</dc:creator>
      <dc:date>2006-05-01T15:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: File::find question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-find-question/m-p/4976420#M783750</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;A Perl question...&lt;BR /&gt;&lt;BR /&gt;First, consider:&lt;BR /&gt;&lt;BR /&gt;If you wanted to find all files in '/var' whose name ended in ".log" but you wanted to *skip* any within '/var/adm' you could do:&lt;BR /&gt;&lt;BR /&gt;# find /var -type f ! -path "/var/adm/*" -prune -name "*.log" -print&lt;BR /&gt;&lt;BR /&gt;NOW, using the above command, with *one modification*, do:&lt;BR /&gt;&lt;BR /&gt;# find2perl /var -type f ! -name "/var/adm/*" -prune -name "*.log" -print&lt;BR /&gt;&lt;BR /&gt;NOTE that the '-path' has been changed to '-name' and then the whole argument passed to 'find2perl'.&lt;BR /&gt;&lt;BR /&gt;The generated 'wanted' subroutine should be what you seek.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 01 May 2006 16:56:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-find-question/m-p/4976420#M783750</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-05-01T16:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: File::find question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-find-question/m-p/4976421#M783751</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;My apologies, the generated code doesn't quite do what we want.  Given my original shell command:&lt;BR /&gt;&lt;BR /&gt;# find /var -type f ! -path "/var/adm/*" -prune -name "*.log" -print&lt;BR /&gt;&lt;BR /&gt;...a 'wanted' subroutine like this should match:&lt;BR /&gt;&lt;BR /&gt;sub wanted {&lt;BR /&gt;    my ($dev,$ino,$mode,$nlink,$uid,$gid);&lt;BR /&gt;&lt;BR /&gt;    (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) &amp;amp;&amp;amp;&lt;BR /&gt;    -f _ &amp;amp;&amp;amp;&lt;BR /&gt;    $File::Find::name !~ /^\/var\/adm\//s &amp;amp;&amp;amp;&lt;BR /&gt;    /^.*\.log\z/s &amp;amp;&amp;amp;&lt;BR /&gt;    print("$name\n");&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 01 May 2006 19:18:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-find-question/m-p/4976421#M783751</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-05-01T19:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: File::find question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-find-question/m-p/4976422#M783752</link>
      <description>Check on $File::Find::dir&lt;BR /&gt;If you want to check on the target of symbolic links too, use Cwd's realpath () or perl's readlink ().&lt;BR /&gt;&lt;BR /&gt;# perl -MFile::Find -le'find(sub{$File::Find::dir=~m{pattern-for-dirs-to-skip} and return;print$File::Find::name},@ARGV)' /var /tmp&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Tue, 02 May 2006 01:27:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-find-question/m-p/4976422#M783752</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2006-05-02T01:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: File::find question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-find-question/m-p/4976423#M783753</link>
      <description>Thanks everyone for your help.</description>
      <pubDate>Tue, 02 May 2006 10:48:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-find-question/m-p/4976423#M783753</guid>
      <dc:creator>Ridzuan Zakaria</dc:creator>
      <dc:date>2006-05-02T10:48:52Z</dc:date>
    </item>
  </channel>
</rss>

