<?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 How to tell how many records in a file in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/how-to-tell-how-many-records-in-a-file/m-p/4979099#M99573</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I would like to know how to know, how many records actually exist in a file. When using ls -al, it displays the total disc space, but not how many records.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Randy</description>
    <pubDate>Mon, 15 May 2006 14:36:03 GMT</pubDate>
    <dc:creator>Randy Hagedorn</dc:creator>
    <dc:date>2006-05-15T14:36:03Z</dc:date>
    <item>
      <title>How to tell how many records in a file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-tell-how-many-records-in-a-file/m-p/4979099#M99573</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I would like to know how to know, how many records actually exist in a file. When using ls -al, it displays the total disc space, but not how many records.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Randy</description>
      <pubDate>Mon, 15 May 2006 14:36:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-tell-how-many-records-in-a-file/m-p/4979099#M99573</guid>
      <dc:creator>Randy Hagedorn</dc:creator>
      <dc:date>2006-05-15T14:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to tell how many records in a file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-tell-how-many-records-in-a-file/m-p/4979100#M99574</link>
      <description>If you are talking about a regular ASCII file, you can do a 'wc -l &lt;FILENAME&gt;' to see the number of lines in a file.&lt;BR /&gt;&lt;BR /&gt;There are other option to 'wc' as well.  Have a look at the man page for more info.&lt;/FILENAME&gt;</description>
      <pubDate>Mon, 15 May 2006 14:42:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-tell-how-many-records-in-a-file/m-p/4979100#M99574</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2006-05-15T14:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to tell how many records in a file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-tell-how-many-records-in-a-file/m-p/4979101#M99575</link>
      <description>UNIX has no concept of records. That is purely a function of the application. You can use wc to count the number of lines and if an ASCII LF is used as a record marker then you have the number of records. If the records are fixed size then the file length / record size will yield the number of records although it is not uncommon for data files to use a header area so this reduces the total number of actual data records. What you may be able to do (if you don't know the record length) is to use od or xd to recogize repeating patterns (ie Names) and the file offsets at which they occur to determine the record size. The most difficult of all are variable sizes records in which the length and offset to the next record are encoded in the current record.</description>
      <pubDate>Mon, 15 May 2006 14:43:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-tell-how-many-records-in-a-file/m-p/4979101#M99575</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-05-15T14:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to tell how many records in a file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-tell-how-many-records-in-a-file/m-p/4979102#M99576</link>
      <description>wc -c to see charcters, wc -l file to see number of lines.. &lt;BR /&gt;&lt;BR /&gt;Thanks and regards&lt;BR /&gt;Prashant</description>
      <pubDate>Mon, 15 May 2006 14:45:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-tell-how-many-records-in-a-file/m-p/4979102#M99576</guid>
      <dc:creator>Prashant Zanwar_4</dc:creator>
      <dc:date>2006-05-15T14:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to tell how many records in a file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-tell-how-many-records-in-a-file/m-p/4979103#M99577</link>
      <description>Thanks to all for your insights on the inner workings of Unix.  The files in question are fixed length records, which is were I hoped the wc -l &lt;FILENAME&gt; would work, but the results were inaccurate.  I think it may be due to the make-up of the data, which contains, string, packed and binary data all in a single record.&lt;BR /&gt;&lt;BR /&gt;However, I will be able to calculate the number of records by doing the wc -c &lt;FILENAME&gt; dividing it by the record length to yield the number of records.&lt;BR /&gt;&lt;BR /&gt;Randy&lt;/FILENAME&gt;&lt;/FILENAME&gt;</description>
      <pubDate>Tue, 16 May 2006 08:33:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-tell-how-many-records-in-a-file/m-p/4979103#M99577</guid>
      <dc:creator>Randy Hagedorn</dc:creator>
      <dc:date>2006-05-16T08:33:40Z</dc:date>
    </item>
  </channel>
</rss>

