title: How to create sparse file on Macos
body: <p>I'm trying to understand the difference between the sparse file and no-sparse using the following article <a href="http://extrabright.com/blog/2010/03/30/how-to-know-if-a-file-on-linux-is-sparse/" rel="nofollow noreferrer">http://extrabright.com/blog/2010/03/30/how-to-know-if-a-file-on-linux-is-sparse/</a></p>
  
  <p>I also created the sparse file <a href="http://prefetch.net/blog/index.php/2009/07/05/creating-sparse-files-on-linux-hosts-with-dd/" rel="nofollow noreferrer">http://prefetch.net/blog/index.php/2009/07/05/creating-sparse-files-on-linux-hosts-with-dd/</a> as mention over here.</p>
  
  <p>But every time I create a file I see the block size to be equal to the actual size of the file (of the above sparse file create)</p>
  
  <pre><code>dd if=/dev/zero of=xen-guest.img bs=1 count=0 seek=1G
  </code></pre>
  
  <p>then using ls command to verify if the file is sparse file</p>
  
  <pre><code>ls -alshk
  1.0G -rw-r--r--  1 ratatouille staff 1.0G Apr 17 08:48 xen-guest.img
  </code></pre>
  
  <p>Can someone explain me what I'm missing over here.</p>
  
  <p>Note:
   the OS is MAC-OS 10.12.3 and the above stuff works properly in <strong>Ubuntu</strong>.</p>