<?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: inconsistent find behavior in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/inconsistent-find-behavior/m-p/4354961#M667337</link>
    <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;&amp;gt; TwoProc: Anybody else confused that find -exec doesn't seem to want/need/accept the trailing "\;" anylonger?&lt;BR /&gt;&lt;BR /&gt;When you use the semicolon as a terminator to '-exec's arguments you must escape it with the back-slash to prevent the shell from interpreting it.  That is, ";" is special to the shell; the "+" isn't.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 09 Feb 2009 21:51:52 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2009-02-09T21:51:52Z</dc:date>
    <item>
      <title>inconsistent find behavior</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/inconsistent-find-behavior/m-p/4354957#M667333</link>
      <description>I am using a script to find large files and give me the long listing or the files found. Doing "find . -size +1000000c" always shows the list of large files found, as expected. If I expand the find command to "find . -size +1000000c -exec ls -l {} \;" - then on some directories it works, but others it lists every file (though with ls -l). What is going on here??</description>
      <pubDate>Mon, 09 Feb 2009 17:24:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/inconsistent-find-behavior/m-p/4354957#M667333</guid>
      <dc:creator>Dave Chamberlin</dc:creator>
      <dc:date>2009-02-09T17:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: inconsistent find behavior</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/inconsistent-find-behavior/m-p/4354958#M667334</link>
      <description>Hi Dave:&lt;BR /&gt;&lt;BR /&gt;If you want _files_ only, you need to say-so:&lt;BR /&gt;&lt;BR /&gt;# find . -type f -size +1000000c -exec ls -l {} +&lt;BR /&gt;&lt;BR /&gt;...will perform the 'ls' on the list which consists of FILES only and not files AND DIRECTORIES.&lt;BR /&gt;&lt;BR /&gt;Note, too, that you will gain performance by using the "+' terminator with the '-exec'.  THis bundles many arguements together and presents them en mass to 'ls' rather than spawning one 'ls' process for every file found!&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 09 Feb 2009 17:29:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/inconsistent-find-behavior/m-p/4354958#M667334</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-02-09T17:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: inconsistent find behavior</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/inconsistent-find-behavior/m-p/4354959#M667335</link>
      <description>Dave,&lt;BR /&gt;&lt;BR /&gt;I usually do the same with:&lt;BR /&gt;&lt;BR /&gt;$&amp;gt; find . -size +1000000c | xargs -i ls -ald {}&lt;BR /&gt;&lt;BR /&gt;Of course, that does what James suggested except it uses xargs to handle the "bunching".&lt;BR /&gt;&lt;BR /&gt;James' solution is nicer in that it doesn't require a middle process spawned to handle bunching.  Except, that when I'm looking for large things, I also just don't worry about whether its a file or not, because I also want to know about large single directories which exist on the system, which are performance bottlenecks.  Yes, I've found directories from programs/programmers with 800,000 files in them... sigh - usually after the programmer wonders why "he can't list" all of the files.  He can, put it's painfully slow...&lt;BR /&gt;&lt;BR /&gt;Anyways, another way to do it and incorporate James' cool suggestion (which I didn't know about):&lt;BR /&gt;&lt;BR /&gt;$&amp;gt; find . -size +1000000c -exec ls -al {} +&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;P.S. Anybody else confused that find -exec doesn't seem to want/need/accept the trailing "\;" anylonger?  Or, am I thinking of something else???&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 09 Feb 2009 21:44:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/inconsistent-find-behavior/m-p/4354959#M667335</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2009-02-09T21:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: inconsistent find behavior</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/inconsistent-find-behavior/m-p/4354960#M667336</link>
      <description>Sorry about the double - post - accidental button push.&lt;BR /&gt;&lt;BR /&gt;BTW, I just realized I didn't explain -the trailing "d" in "ls -ald" tells ls *not* to expand the subdirectories for you.&lt;BR /&gt;&lt;BR /&gt;No points for this post, or the prior mistaken double-post.</description>
      <pubDate>Mon, 09 Feb 2009 21:46:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/inconsistent-find-behavior/m-p/4354960#M667336</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2009-02-09T21:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: inconsistent find behavior</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/inconsistent-find-behavior/m-p/4354961#M667337</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;&amp;gt; TwoProc: Anybody else confused that find -exec doesn't seem to want/need/accept the trailing "\;" anylonger?&lt;BR /&gt;&lt;BR /&gt;When you use the semicolon as a terminator to '-exec's arguments you must escape it with the back-slash to prevent the shell from interpreting it.  That is, ";" is special to the shell; the "+" isn't.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 09 Feb 2009 21:51:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/inconsistent-find-behavior/m-p/4354961#M667337</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-02-09T21:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: inconsistent find behavior</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/inconsistent-find-behavior/m-p/4354962#M667338</link>
      <description>Wow, I went back and checked, and in my response the last "d" in the "ls -ald" was there.  But I see in the posting itself - it isn't!  I'm guessing my screen didn't keep up with my backspaces, or I had someother screen junk in there.&lt;BR /&gt;&lt;BR /&gt;Anyway, it's supposed to be:&lt;BR /&gt;&lt;BR /&gt;$&amp;gt; find . -size +10000000c -exec ls -ald +&lt;BR /&gt;&lt;BR /&gt;not &lt;BR /&gt;&lt;BR /&gt;$&amp;gt; find . -size +10000000c -exec ls -al +&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;Geez, I only WISH I could mess up *more* postings today!!!  UUUGH!</description>
      <pubDate>Mon, 09 Feb 2009 22:23:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/inconsistent-find-behavior/m-p/4354962#M667338</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2009-02-09T22:23:35Z</dc:date>
    </item>
  </channel>
</rss>

