At first glance it doesn&#39;t care much.<br><br>[sean@bob ddtest]$ echo &quot;hello&quot; &gt; test<br>[sean@bob ddtest]$ ls -l test<br>-rw-rw-r-- 1 sean sean 6 Feb 21 21:43 test<br>[sean@bob ddtest]$ dd if=test of=test.out
 bs=1k<br>0+1 records in<br>0+1 records out<br>6 bytes (6 B) copied, 0.000157303 seconds, 38.1 kB/s<br>[sean@bob ddtest]$ ls -l test.out<br>-rw-rw-r-- 1 sean sean 6 Feb 21 21:43 test.out<br><br>Flip through the source code to 
dd.c:<br><br>/* The number of bytes in which atomic reads are done. */<br>static size_t input_blocksize = 0;<br><br>/* The number of bytes in which atomic writes are done. */<br>static size_t output_blocksize = 0;<br><br>
You&#39;d have to browser a bit deeper to get the One True Answer, there looks like there are several different types of copying that can happen, each has different behaviours.<br><br>notrunc is a bit easier, it&#39;s only referenced in two places, both in the same function.&nbsp; It seems to be a direct setting/clearing of O_TRUNC to open(2):
<br><br>&nbsp; O_TRUNC<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If&nbsp; the&nbsp; file&nbsp; already exists and is a regular file and the open<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mode allows writing (i.e., is O_RDWR or&nbsp; O_WRONLY)&nbsp; it&nbsp; will&nbsp; be<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; truncated to length 0.&nbsp; If the file is a FIFO or terminal device
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; file, the O_TRUNC flag&nbsp; is&nbsp; ignored.&nbsp; Otherwise&nbsp; the&nbsp; effect&nbsp; of<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; O_TRUNC is unspecified.<br><br>Sean<br><br><br><div><span class="gmail_quote">On 2/21/07, <b class="gmail_sendername">Dan Martin
</b> &lt;<a href="mailto:ummar143@cc.umanitoba.ca" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">ummar143@cc.umanitoba.ca</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Can someone tell me how the dd command handles block sizes?&nbsp;&nbsp;The man<br>page and any Linux books I have don&#39;t explain it very well.<br><br>If I specify<br>dd if=\dev\mydevice ... bs=1M<br>What happens if mydevice has a fraction of a block left over?
<br><br>What is &quot;notrunc&quot; for the output file?&nbsp;&nbsp;Truncation from what to what?<br><br>--<br>&nbsp;&nbsp;-Dan<br><br>Dr. Dan Martin, MD, CCFP, BSc, BCSc (Hon)<br><br>GP Hospital Practitioner<br>Computer Science grad student
<br><a href="mailto:ummar143@cc.umanitoba.ca" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">ummar143@cc.umanitoba.ca</a><br>(204) 831-1746<br>answering machine always on<br><br>_______________________________________________
<br>Roundtable mailing list<br><a href="mailto:Roundtable@muug.mb.ca" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Roundtable@muug.mb.ca</a><br><a href="http://www.muug.mb.ca/mailman/listinfo/roundtable" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.muug.mb.ca/mailman/listinfo/roundtable</a><br><br>
</blockquote></div><br><br clear="all"><br>-- <br>Sean Walberg &lt;<a href="mailto:sean@ertw.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
sean@ertw.com</a>&gt;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://ertw.com/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://ertw.com/</a>