<div dir="ltr">You can test the system ls by setting the env for it. i.e. &#39;env BLOCKSIZE=512 ls -l&#39;<div><br></div><div>It will then use blocksize of 512 which is the default for our programs. I used this to make sure my output matches the system ls for the same blocksize. </div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 7, 2013 at 3:21 PM, hao wu <span dir="ltr">&lt;<a href="mailto:hwu9@stevens.edu" target="_blank">hwu9@stevens.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div>I found out the reason, it because that my system physical block size actually  is 4096.<br><br>12987/4096 = 3.17  ==&gt; 4<br><br></div><div>and BLOCKSIZE not have to set as the same value as the physical block size<br>


<br><br></div><br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 7, 2013 at 3:09 PM, hao wu <span dir="ltr">&lt;<a href="mailto:hwu9@stevens.edu" target="_blank">hwu9@stevens.edu</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div>suppose I have a file abc, its  size is 12987,<br></div><br></div>the environment BLOCKSIZE now is 2048.<br>


<br></div>12987/2048  = 6.34<br><br></div>I think the blocks used should be 7.<br>
<br>but in ls ,it shows 8<br></div><div><br></div><div>I found that the blocks used are always even in ls, any ideas?<br></div><br></div>Thanks,<br></div>Hao<br><div><div><div><div><br><br></div></div></div></div></div>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
cs631apue mailing list<br>
<a href="mailto:cs631apue@lists.stevens.edu">cs631apue@lists.stevens.edu</a><br>
<a href="https://lists.stevens.edu/mailman/listinfo/cs631apue" target="_blank">https://lists.stevens.edu/mailman/listinfo/cs631apue</a><br>
<br></blockquote></div><br></div>