<?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 Find command exclude directories in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-exclude-directories/m-p/4159825#M319839</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I'm trying to search for a file in the root directory that was created during the day. I have no idea what it is and the root filesystem is almost full.&lt;BR /&gt;&lt;BR /&gt;How do I do a search only in the root directory excluding other filesystems etc: /etc /var ...&lt;BR /&gt;&lt;BR /&gt;So my find command will be something like: find / -size +100 -mtime +1 ...?&lt;BR /&gt;&lt;BR /&gt;Please who can help?&lt;BR /&gt;&lt;BR /&gt;Schalk</description>
    <pubDate>Wed, 12 Mar 2008 08:16:28 GMT</pubDate>
    <dc:creator>sgreyling</dc:creator>
    <dc:date>2008-03-12T08:16:28Z</dc:date>
    <item>
      <title>Find command exclude directories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-exclude-directories/m-p/4159825#M319839</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I'm trying to search for a file in the root directory that was created during the day. I have no idea what it is and the root filesystem is almost full.&lt;BR /&gt;&lt;BR /&gt;How do I do a search only in the root directory excluding other filesystems etc: /etc /var ...&lt;BR /&gt;&lt;BR /&gt;So my find command will be something like: find / -size +100 -mtime +1 ...?&lt;BR /&gt;&lt;BR /&gt;Please who can help?&lt;BR /&gt;&lt;BR /&gt;Schalk</description>
      <pubDate>Wed, 12 Mar 2008 08:16:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-exclude-directories/m-p/4159825#M319839</guid>
      <dc:creator>sgreyling</dc:creator>
      <dc:date>2008-03-12T08:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: Find command exclude directories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-exclude-directories/m-p/4159826#M319840</link>
      <description>You need to add -xdev to prevent crossing to other file systems.</description>
      <pubDate>Wed, 12 Mar 2008 08:24:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-exclude-directories/m-p/4159826#M319840</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-03-12T08:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: Find command exclude directories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-exclude-directories/m-p/4159827#M319841</link>
      <description>&lt;!--!*#--&gt;Hi Dennis,&lt;BR /&gt;   You may please explain bit more with your above answer ... I mean to say with one example.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;   &lt;BR /&gt;</description>
      <pubDate>Wed, 12 Mar 2008 08:44:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-exclude-directories/m-p/4159827#M319841</guid>
      <dc:creator>Davis Paul</dc:creator>
      <dc:date>2008-03-12T08:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: Find command exclude directories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-exclude-directories/m-p/4159828#M319842</link>
      <description>Thanks for the reply.&lt;BR /&gt;&lt;BR /&gt;I want to exclude certain directories, for instance if I run "find / -size +100 -mtime +1 -xdev /etc -exec ls -l {} \;" I still get: two problems&lt;BR /&gt;&lt;BR /&gt;1) It finds files in /etc&lt;BR /&gt;2) I get very old files, whats wrong with my mtime?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;SChalk</description>
      <pubDate>Wed, 12 Mar 2008 08:44:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-exclude-directories/m-p/4159828#M319842</guid>
      <dc:creator>sgreyling</dc:creator>
      <dc:date>2008-03-12T08:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Find command exclude directories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-exclude-directories/m-p/4159829#M319843</link>
      <description>&amp;gt;I want to exclude certain directories&lt;BR /&gt;&lt;BR /&gt;It is better to grep -v the result of find if you have anything complicated.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;find / -size +100 -mtime +1 -xdev /etc -exec ls -l {} \;&lt;BR /&gt;&lt;BR /&gt;-xdev doesn't take a path.&lt;BR /&gt;You should also replace "\;" by "+" for performance.&lt;BR /&gt;You'll probably want to skip directories (-type f) or you'll need to change your "ls -l" to "ll -d".&lt;BR /&gt;&lt;BR /&gt;&amp;gt;1) It finds files in /etc&lt;BR /&gt;&lt;BR /&gt;That will happen if in the same file system as /.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;2) I get very old files, whats wrong with my mtime?&lt;BR /&gt;&lt;BR /&gt;+1 is older than 1 day.  You want -1.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Davis: You may please explain bit more with your above answer&lt;BR /&gt;&lt;BR /&gt;Not much to explain, look at find(1).  Just add -xdev before the -exec.&lt;BR /&gt;&lt;BR /&gt;I've also noticed that you seem to be checking the "Retain format" box.  That doesn't make it easy to follow links:&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1212050" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1212050&lt;/A&gt;</description>
      <pubDate>Wed, 12 Mar 2008 09:13:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-exclude-directories/m-p/4159829#M319843</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-03-12T09:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: Find command exclude directories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-exclude-directories/m-p/4159830#M319844</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;with 'man find' you would get all informations you want.&lt;BR /&gt;'-xdev' is a stand-alone option to aviod 'find' to search across MOUNTED file systems. So if /etc, /var is mounted, it would be excluded.&lt;BR /&gt;To avoid find to search through certain directories use '-prune' - check the man pages of find with the examples how to use it.&lt;BR /&gt;&lt;BR /&gt;Volkmar&lt;BR /&gt;</description>
      <pubDate>Wed, 12 Mar 2008 09:20:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-exclude-directories/m-p/4159830#M319844</guid>
      <dc:creator>V. Nyga</dc:creator>
      <dc:date>2008-03-12T09:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: Find command exclude directories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-exclude-directories/m-p/4159831#M319845</link>
      <description>Hi Dennis,&lt;BR /&gt;&lt;BR /&gt;Sorry, the command with /etc was the incorrect command I copied from my putty session. It was suppose to be without /etc&lt;BR /&gt;&lt;BR /&gt;Thanks, the -1 option works.&lt;BR /&gt;&lt;BR /&gt;Let me try to rephrase my question:&lt;BR /&gt;&lt;BR /&gt;I want to find files everywhere under root but exclude directories /users, /etc, /var, /data ...&lt;BR /&gt;&lt;BR /&gt;Hope this makes more sense.</description>
      <pubDate>Wed, 12 Mar 2008 09:24:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-exclude-directories/m-p/4159831#M319845</guid>
      <dc:creator>sgreyling</dc:creator>
      <dc:date>2008-03-12T09:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: Find command exclude directories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-exclude-directories/m-p/4159832#M319846</link>
      <description>Hi again,&lt;BR /&gt;&lt;BR /&gt;so test:&lt;BR /&gt;find / -path ./etc -prune (or /etc -prune )&lt;BR /&gt;&lt;BR /&gt;V.&lt;BR /&gt;</description>
      <pubDate>Wed, 12 Mar 2008 09:31:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-exclude-directories/m-p/4159832#M319846</guid>
      <dc:creator>V. Nyga</dc:creator>
      <dc:date>2008-03-12T09:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: Find command exclude directories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-exclude-directories/m-p/4159833#M319847</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;try something like this:&lt;BR /&gt;&lt;BR /&gt;# find /  \( ! -path "/etc/*" \) -a  \( ! -path  "/users/*" \) -a \( ! -path "/data/*" \) -type f&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
      <pubDate>Wed, 12 Mar 2008 10:02:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-exclude-directories/m-p/4159833#M319847</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2008-03-12T10:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: Find command exclude directories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-exclude-directories/m-p/4159834#M319848</link>
      <description>you seem to really want to exclude stuff like /etc.  &lt;BR /&gt;&lt;BR /&gt;I have an easy way to exclude /etc.&lt;BR /&gt;&lt;BR /&gt;DONT.  &lt;BR /&gt;&lt;BR /&gt;Instead filter it off AFTER you got your list of files.  &lt;BR /&gt;&lt;BR /&gt;try this....&lt;BR /&gt;find / -xdev -mtime -1 -size +2000 -type f -print  | grep -vE "^/etc"  \ &amp;gt; /tmp/mybigoldfile.txt&lt;BR /&gt;&lt;BR /&gt;You said the / file system is almost full.  You can say you don't want to look at /etc, but I bet /etc is part of the / filesystem.  So you should be looking there instead of ignoring it.&lt;BR /&gt;&lt;BR /&gt;The option I really like is that -xdev.  It excludes stuff that is on the filesystem you are looking at. &lt;BR /&gt;</description>
      <pubDate>Thu, 13 Mar 2008 11:54:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-exclude-directories/m-p/4159834#M319848</guid>
      <dc:creator>Steve Post</dc:creator>
      <dc:date>2008-03-13T11:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: Find command exclude directories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-exclude-directories/m-p/4159835#M319849</link>
      <description>&amp;gt;Steve: Instead filter it off AFTER you got your list of files. &lt;BR /&gt;&lt;BR /&gt;Didn't I already say that?  :-)</description>
      <pubDate>Thu, 13 Mar 2008 12:26:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-exclude-directories/m-p/4159835#M319849</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-03-13T12:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: Find command exclude directories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-exclude-directories/m-p/4159836#M319850</link>
      <description>Check wheather /etc/lvmconf/vg* files &lt;BR /&gt;If old files are there the delete that one.&lt;BR /&gt;or tar the files.</description>
      <pubDate>Thu, 13 Mar 2008 12:29:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-exclude-directories/m-p/4159836#M319850</guid>
      <dc:creator>sachit patil</dc:creator>
      <dc:date>2008-03-13T12:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: Find command exclude directories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-exclude-directories/m-p/4159837#M319851</link>
      <description>Dennis,&lt;BR /&gt;Yep.  Sorry.  I just didn't see it.&lt;BR /&gt;&lt;BR /&gt;steve</description>
      <pubDate>Thu, 13 Mar 2008 12:34:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-exclude-directories/m-p/4159837#M319851</guid>
      <dc:creator>Steve Post</dc:creator>
      <dc:date>2008-03-13T12:34:01Z</dc:date>
    </item>
  </channel>
</rss>

