title: How to initialize a file system?
body: <p>I have some partitions on /dev/sda. I want to remove them all of them programatically. One way is to list all partitions and then delete them one by one. Another way is to just execute</p>
  
  <pre><code>dd if=/dev/zero of=/dev/sda
  </code></pre>
  
  <p>The first option failed when I got some problem with my partition table due to which the listing of the current partitions was not giving any output thereby I was unable to delete any current partition.</p>
  
  <p>The second method is taking too long. Is there any "quick way" to just set the whole hard disk (/dev/sda) as unpartitioned from a shell script?</p>