<?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: Files Count in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/files-count/m-p/3379316#M197233</link>
    <description>find . -exec ll -d {} \; |cut -c1|sort|uniq -c</description>
    <pubDate>Wed, 15 Sep 2004 06:49:17 GMT</pubDate>
    <dc:creator>hein coulier</dc:creator>
    <dc:date>2004-09-15T06:49:17Z</dc:date>
    <item>
      <title>Files Count</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/files-count/m-p/3379311#M197228</link>
      <description>Gd Day Forum,&lt;BR /&gt;&lt;BR /&gt;I will be performing a filesystem copy to another filesystem using the cp -Rhp option.&lt;BR /&gt;&lt;BR /&gt;I need to verify that the resultant filesystem does not miss out any files.&lt;BR /&gt;&lt;BR /&gt;I run the command ls -al |grep ^d |wc -l for directory count&lt;BR /&gt;I run the command ls -al |grep ^- |wc -l for file count &lt;BR /&gt;I will run the command ls to grep for            &lt;BR /&gt;b    Block special file&lt;BR /&gt;c    Character special file&lt;BR /&gt;d    Directory&lt;BR /&gt;l    Symbolic link&lt;BR /&gt;n    Network special file&lt;BR /&gt;p    Fifo (also called a "named pipe") special file&lt;BR /&gt;s    Socket&lt;BR /&gt;-    Ordinary file&lt;BR /&gt;&lt;BR /&gt;Just wondering is there any other better way to perform the file count from the top directory level rather then cd to each directory and perform the ls command mentioned above?&lt;BR /&gt;&lt;BR /&gt;thanks n regards/cliff</description>
      <pubDate>Wed, 15 Sep 2004 06:20:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/files-count/m-p/3379311#M197228</guid>
      <dc:creator>Cliff Lim Kok Hwee</dc:creator>
      <dc:date>2004-09-15T06:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: Files Count</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/files-count/m-p/3379312#M197229</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;what about "ls -lR|wc -l" in the top level directory ?&lt;BR /&gt;Will give you a summary all over &lt;BR /&gt;&lt;BR /&gt;Simple, but effective :-)&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Franky</description>
      <pubDate>Wed, 15 Sep 2004 06:25:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/files-count/m-p/3379312#M197229</guid>
      <dc:creator>Franky_1</dc:creator>
      <dc:date>2004-09-15T06:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: Files Count</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/files-count/m-p/3379313#M197230</link>
      <description>Hi Cliff,&lt;BR /&gt;&lt;BR /&gt;cp command warns you for each file it misses! Do it like this:&lt;BR /&gt;&lt;BR /&gt;cp -Rhp ... |more</description>
      <pubDate>Wed, 15 Sep 2004 06:28:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/files-count/m-p/3379313#M197230</guid>
      <dc:creator>Eric Antunes</dc:creator>
      <dc:date>2004-09-15T06:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: Files Count</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/files-count/m-p/3379314#M197231</link>
      <description>You could try running "find /dirname |wc -l" in each of the directories.  That will count everything - directories, files, etc - and the totals should match.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Wed, 15 Sep 2004 06:30:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/files-count/m-p/3379314#M197231</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2004-09-15T06:30:32Z</dc:date>
    </item>
    <item>
      <title>Re: Files Count</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/files-count/m-p/3379315#M197232</link>
      <description>We can simulate ls operation with find command,&lt;BR /&gt;&lt;BR /&gt; find &lt;DIRECTORY&gt; -name "*"&lt;BR /&gt; &lt;BR /&gt; "*" -- will give all files,&lt;BR /&gt;&lt;BR /&gt; So try as,&lt;BR /&gt;&lt;BR /&gt; OLDFSDIR&amp;gt; cd &lt;OLDFSDIR&gt;; find . -name "*" &amp;gt; /tmp/oldfs.log&lt;BR /&gt;&lt;BR /&gt; NEWFSDIR&amp;gt; cd &lt;NEWFSDIR&gt;; find . -name "*" &amp;gt; /tmp/newfs.log&lt;BR /&gt;&lt;BR /&gt; Check the difference with diff command as,&lt;BR /&gt;&lt;BR /&gt; diff /tmp/oldfs.log /tmp/newfs.log&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; It will it easily.&lt;BR /&gt;&lt;BR /&gt; More you can use -type &lt;FILETYPE&gt; on find command too as,&lt;BR /&gt;&lt;BR /&gt; find . -type f -name "*"&lt;BR /&gt;&lt;BR /&gt; f is regular file,&lt;BR /&gt; &lt;BR /&gt; see more on find command for -type option. as&lt;BR /&gt;f regular file&lt;BR /&gt;b Block special file&lt;BR /&gt;c Character special file&lt;BR /&gt;d Directory&lt;BR /&gt;l Symbolic link&lt;BR /&gt;n Network special file&lt;BR /&gt;p Fifo (also called a "named pipe") special file&lt;BR /&gt;s Socket &lt;BR /&gt;&lt;BR /&gt;HTH.&lt;BR /&gt;- Muthu&lt;BR /&gt;&lt;/FILETYPE&gt;&lt;/NEWFSDIR&gt;&lt;/OLDFSDIR&gt;&lt;/DIRECTORY&gt;</description>
      <pubDate>Wed, 15 Sep 2004 06:44:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/files-count/m-p/3379315#M197232</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2004-09-15T06:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Files Count</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/files-count/m-p/3379316#M197233</link>
      <description>find . -exec ll -d {} \; |cut -c1|sort|uniq -c</description>
      <pubDate>Wed, 15 Sep 2004 06:49:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/files-count/m-p/3379316#M197233</guid>
      <dc:creator>hein coulier</dc:creator>
      <dc:date>2004-09-15T06:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: Files Count</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/files-count/m-p/3379317#M197234</link>
      <description>I would do ls -lR at the top level directory as suggested and output to a temp file.  This command could take quite a while depending on the file system and if you need to do multiple pattern mathes (i.e. for files, dirs, etc), you can do it on the temp file which would be much faster and less system intensive.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 15 Sep 2004 07:25:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/files-count/m-p/3379317#M197234</guid>
      <dc:creator>Tom Danzig</dc:creator>
      <dc:date>2004-09-15T07:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: Files Count</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/files-count/m-p/3379318#M197235</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;if someone could help you, please don't forget to assign points&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Franky</description>
      <pubDate>Wed, 15 Sep 2004 08:27:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/files-count/m-p/3379318#M197235</guid>
      <dc:creator>Franky_1</dc:creator>
      <dc:date>2004-09-15T08:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: Files Count</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/files-count/m-p/3379319#M197236</link>
      <description>While with options of ls you may get the count for no. of files, dirs, links, socket file etc., how about using dd for copying the file system.&lt;BR /&gt;&lt;BR /&gt;This would ensure that everything is copied to the destination and perms will be same as that of the source. Also you have option of using a larger block size and copy it fast.&lt;BR /&gt;&lt;BR /&gt;dd if=/dev/vgxx/lvolx of=/dev/vgyy/lvoly bs=1024k&lt;BR /&gt;&lt;BR /&gt;Anil</description>
      <pubDate>Wed, 15 Sep 2004 08:37:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/files-count/m-p/3379319#M197236</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2004-09-15T08:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Files Count</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/files-count/m-p/3379320#M197237</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Pls try checking the cp's command return code, i.e:&lt;BR /&gt;&lt;BR /&gt;cp -Rp ...&lt;BR /&gt;STATUS=$?&lt;BR /&gt;if [ "$STATUS" = "0" ]&lt;BR /&gt;then&lt;BR /&gt;   echo "Command concluded successfully"&lt;BR /&gt;else&lt;BR /&gt;   echo "Command concluded with errors"&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;Rgds.</description>
      <pubDate>Wed, 15 Sep 2004 09:04:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/files-count/m-p/3379320#M197237</guid>
      <dc:creator>Jose Mosquera</dc:creator>
      <dc:date>2004-09-15T09:04:57Z</dc:date>
    </item>
    <item>
      <title>Re: Files Count</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/files-count/m-p/3379321#M197238</link>
      <description>Thanks for all the responses guys...&lt;BR /&gt;&lt;BR /&gt;I think ls -lR |wc -l works well.&lt;BR /&gt;&lt;BR /&gt;cheers/cliff</description>
      <pubDate>Wed, 15 Sep 2004 21:47:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/files-count/m-p/3379321#M197238</guid>
      <dc:creator>Cliff Lim Kok Hwee</dc:creator>
      <dc:date>2004-09-15T21:47:52Z</dc:date>
    </item>
  </channel>
</rss>

