<?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 Discrepancy between bdf, df and ls in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/discrepancy-between-bdf-df-and-ls/m-p/2832855#M89306</link>
    <description>Hello All,&lt;BR /&gt;&lt;BR /&gt;We have a 5 GB filesystem /oradata1 that is 80% full. We have 1 GB free. Our Oracle DBA created a 2 GB *.dbf file. How is this possible?&lt;BR /&gt;&lt;BR /&gt;When I go into the directory /oradata1/oradata/some_instance and do an ll the file temp01.dbf is 2 GB in size. &lt;BR /&gt;&lt;BR /&gt;However when I do a "du -ks *" in /oradata1/oradata/some_instance directory I get the size of temp01.dbf as 72 KB. &lt;BR /&gt;&lt;BR /&gt;A bdf still shows 80% usage. So does df -k. Does anyone know the cause of this discrepancy?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance to all replies.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Suren Selva&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 24 Oct 2002 15:59:46 GMT</pubDate>
    <dc:creator>Suren Selva</dc:creator>
    <dc:date>2002-10-24T15:59:46Z</dc:date>
    <item>
      <title>Discrepancy between bdf, df and ls</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/discrepancy-between-bdf-df-and-ls/m-p/2832855#M89306</link>
      <description>Hello All,&lt;BR /&gt;&lt;BR /&gt;We have a 5 GB filesystem /oradata1 that is 80% full. We have 1 GB free. Our Oracle DBA created a 2 GB *.dbf file. How is this possible?&lt;BR /&gt;&lt;BR /&gt;When I go into the directory /oradata1/oradata/some_instance and do an ll the file temp01.dbf is 2 GB in size. &lt;BR /&gt;&lt;BR /&gt;However when I do a "du -ks *" in /oradata1/oradata/some_instance directory I get the size of temp01.dbf as 72 KB. &lt;BR /&gt;&lt;BR /&gt;A bdf still shows 80% usage. So does df -k. Does anyone know the cause of this discrepancy?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance to all replies.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Suren Selva&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 24 Oct 2002 15:59:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/discrepancy-between-bdf-df-and-ls/m-p/2832855#M89306</guid>
      <dc:creator>Suren Selva</dc:creator>
      <dc:date>2002-10-24T15:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: Discrepancy between bdf, df and ls</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/discrepancy-between-bdf-df-and-ls/m-p/2832856#M89307</link>
      <description>Answer: sparse files (very common question). Oracle creates only a few parts of the file at random file positions, the rest of the file is undefined. A sparse file is one that has been created with 'holes' or unwritten parts. &lt;BR /&gt;&lt;BR /&gt;Consider writing a file with record #1, then by seeking to record one million, writing another record and then closing the file. The file has but two records and occupies only a couple of blocks but the missing parts are not stored nor counted in bdf(1) or du(1). &lt;BR /&gt;&lt;BR /&gt;Depending on the size of the file and the spareseness, the difference in apparent versus actual size may be VERY large. &lt;BR /&gt;&lt;BR /&gt;Create your own sparse file with: &lt;BR /&gt;&lt;BR /&gt;dd if=/etc/issue of=/var/tmp/sparse bs=2048k seek=1 &lt;BR /&gt;&lt;BR /&gt;where you will see the original file is just a few dozen bytes, the result with ls -l or wc -c shows a 2 meg file, but du(1) will show the file as occupying just a bit more than the original /etc/issue file. A cp(1) of the file will create a new file that is the same size (using ls -l or wc -c) but du(1) will now show a MUCH larger size than the original file. &lt;BR /&gt;&lt;BR /&gt;A common file that is often sparse is a core file from a crashed program. Another file that might be sparse is /etc/mail/aliases.pag. And of course, any programmer could write special code that creates a sparse file. &lt;BR /&gt;</description>
      <pubDate>Thu, 24 Oct 2002 16:28:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/discrepancy-between-bdf-df-and-ls/m-p/2832856#M89307</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2002-10-24T16:28:24Z</dc:date>
    </item>
  </channel>
</rss>

