<?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: find command upto 2 sub-directory depth level in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-upto-2-sub-directory-depth-level/m-p/3890252#M281365</link>
    <description>To descend upto the 2 sub-dir depth level starting from "/mydir" use:&lt;BR /&gt;&lt;BR /&gt;# # find /mydir ! -path "/mydir/*/*/*"&lt;BR /&gt;&lt;BR /&gt;...this will list hidden files and sub-dirs too.&lt;BR /&gt;&lt;BR /&gt;~hope it helps</description>
    <pubDate>Tue, 31 Oct 2006 21:00:24 GMT</pubDate>
    <dc:creator>Sandman!</dc:creator>
    <dc:date>2006-10-31T21:00:24Z</dc:date>
    <item>
      <title>find command upto 2 sub-directory depth level</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-upto-2-sub-directory-depth-level/m-p/3890250#M281363</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;What is the command syntax if i need to find the files and directories using find command upto the 2 sub-directory depth level from the specified search directory ?&lt;BR /&gt;Also how to include search for hidden files and sub-directories in the above command syntax ?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Shiv</description>
      <pubDate>Tue, 31 Oct 2006 19:06:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-upto-2-sub-directory-depth-level/m-p/3890250#M281363</guid>
      <dc:creator>Shivkumar</dc:creator>
      <dc:date>2006-10-31T19:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: find command upto 2 sub-directory depth level</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-upto-2-sub-directory-depth-level/m-p/3890251#M281364</link>
      <description>Hi Shiv:&lt;BR /&gt;&lt;BR /&gt;# find /mypath -xdev -print&lt;BR /&gt;&lt;BR /&gt;...would find both files and directories recursively down every subdirectory.  Hidden files (those with a leading ".") are also returned implicitly.&lt;BR /&gt;&lt;BR /&gt;# find /mypath -xdev -type f -print&lt;BR /&gt;&lt;BR /&gt;...would do the same as the first example, but return only files.&lt;BR /&gt;&lt;BR /&gt;If you don't want to descend a particular subdirectory, you need to do something like:&lt;BR /&gt;&lt;BR /&gt;# find /mypath -type f ! -path "/mypath/.shiv/*" -a ! -path "/mypath/.jrf/*"&lt;BR /&gt;&lt;BR /&gt;...would find *files* (only) in the '/mypath' directory, but *skip* descending '/mypath/.shiv' and '/mypath/.jrf'.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Tue, 31 Oct 2006 19:27:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-upto-2-sub-directory-depth-level/m-p/3890251#M281364</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-10-31T19:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: find command upto 2 sub-directory depth level</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-upto-2-sub-directory-depth-level/m-p/3890252#M281365</link>
      <description>To descend upto the 2 sub-dir depth level starting from "/mydir" use:&lt;BR /&gt;&lt;BR /&gt;# # find /mydir ! -path "/mydir/*/*/*"&lt;BR /&gt;&lt;BR /&gt;...this will list hidden files and sub-dirs too.&lt;BR /&gt;&lt;BR /&gt;~hope it helps</description>
      <pubDate>Tue, 31 Oct 2006 21:00:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-upto-2-sub-directory-depth-level/m-p/3890252#M281365</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2006-10-31T21:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: find command upto 2 sub-directory depth level</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-upto-2-sub-directory-depth-level/m-p/3890253#M281366</link>
      <description>Hi Shiv,&lt;BR /&gt;&lt;BR /&gt;GNU find has the '-maxdepth' directive.&lt;BR /&gt;&lt;BR /&gt;# find /path -maxdepth 2 -print&lt;BR /&gt;&lt;BR /&gt;Without GNU find, you will have to grep on the number of slashes or directories in the path.&lt;BR /&gt;&lt;BR /&gt;GNU find is available here:&lt;BR /&gt;&lt;A href="http://hpux.cs.utah.edu/hppd/hpux/Gnu/findutils-4.2.28/" target="_blank"&gt;http://hpux.cs.utah.edu/hppd/hpux/Gnu/findutils-4.2.28/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;PCS</description>
      <pubDate>Tue, 31 Oct 2006 21:09:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-upto-2-sub-directory-depth-level/m-p/3890253#M281366</guid>
      <dc:creator>spex</dc:creator>
      <dc:date>2006-10-31T21:09:04Z</dc:date>
    </item>
  </channel>
</rss>

