<?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 in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command/m-p/4793769#M641313</link>
    <description>Add "echo" after -exec and it will just display the command lines it would execute, instead of actually executing them:&lt;BR /&gt;&lt;BR /&gt;find /home -xdev -type f -name core -exec echo ls -ld {}\;&lt;BR /&gt;&lt;BR /&gt;Your original command will go through /home and all the sub-directories of /home that are within the same filesystem (i.e. it will not cross mount points, because of the -xdev option). &lt;BR /&gt;&lt;BR /&gt;It will look for regular files (option -type f) named "core" (option -name ...). For each file it finds, your command will run "ls -ld &lt;FILENAME&gt;".&lt;BR /&gt;&lt;BR /&gt;For example, if the /home filesystem contains files /home/kchand/project1/core, /home/luser/core and /home/joe/very/deep/directory/structure/core, then find would run the following commands:&lt;BR /&gt;&lt;BR /&gt;ls -ld /home/kchand/project1/core&lt;BR /&gt;ls -ld /home/luser/core&lt;BR /&gt;ls -ld /home/joe/very/deep/directory/structure/core&lt;BR /&gt;&lt;BR /&gt;MK&lt;/FILENAME&gt;</description>
    <pubDate>Tue, 31 May 2011 10:18:36 GMT</pubDate>
    <dc:creator>Matti_Kurkela</dc:creator>
    <dc:date>2011-05-31T10:18:36Z</dc:date>
    <item>
      <title>Find command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command/m-p/4793767#M641311</link>
      <description>Hi, I'm new to UNIX..&lt;BR /&gt;Could you please explain me what does the below find command execute?&lt;BR /&gt;&lt;BR /&gt;find /home -xdev -type f -name core -exec ls -ld {}\;</description>
      <pubDate>Tue, 31 May 2011 09:21:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command/m-p/4793767#M641311</guid>
      <dc:creator>Kumar_Chand</dc:creator>
      <dc:date>2011-05-31T09:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: Find command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command/m-p/4793768#M641312</link>
      <description>&amp;gt; find /home -xdev -type f -name core -exec ls -ld {}\;&lt;BR /&gt; &lt;BR /&gt;This command looks through the /home directory (and sub-directories) looking for a file named "core" and if found, shows the file with an ls -d command.&lt;BR /&gt; &lt;BR /&gt;Here are the details:&lt;BR /&gt;/home = starting directory&lt;BR /&gt;-xdev = do not cross any moutpoints within /home. A mountpoint could be an NFS mount from another system or another logical volume (lvol).&lt;BR /&gt;-type f = locate only ordinary files, not directories or symlinks, etc&lt;BR /&gt;-name core = match only files named "core"&lt;BR /&gt;-exec ls -ld = when a match is found run the command ls -ld on the file&lt;BR /&gt;{} = a placeholder where the filename would be required for ls -ld&lt;BR /&gt;\; = the exec option needs the command line terminated with either \; or +&lt;BR /&gt; &lt;BR /&gt;The man page for find covers all these details.</description>
      <pubDate>Tue, 31 May 2011 10:17:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command/m-p/4793768#M641312</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2011-05-31T10:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: Find command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command/m-p/4793769#M641313</link>
      <description>Add "echo" after -exec and it will just display the command lines it would execute, instead of actually executing them:&lt;BR /&gt;&lt;BR /&gt;find /home -xdev -type f -name core -exec echo ls -ld {}\;&lt;BR /&gt;&lt;BR /&gt;Your original command will go through /home and all the sub-directories of /home that are within the same filesystem (i.e. it will not cross mount points, because of the -xdev option). &lt;BR /&gt;&lt;BR /&gt;It will look for regular files (option -type f) named "core" (option -name ...). For each file it finds, your command will run "ls -ld &lt;FILENAME&gt;".&lt;BR /&gt;&lt;BR /&gt;For example, if the /home filesystem contains files /home/kchand/project1/core, /home/luser/core and /home/joe/very/deep/directory/structure/core, then find would run the following commands:&lt;BR /&gt;&lt;BR /&gt;ls -ld /home/kchand/project1/core&lt;BR /&gt;ls -ld /home/luser/core&lt;BR /&gt;ls -ld /home/joe/very/deep/directory/structure/core&lt;BR /&gt;&lt;BR /&gt;MK&lt;/FILENAME&gt;</description>
      <pubDate>Tue, 31 May 2011 10:18:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command/m-p/4793769#M641313</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2011-05-31T10:18:36Z</dc:date>
    </item>
  </channel>
</rss>

