<div dir="ltr">thanks. <div>but<span style="font-family:arial,sans-serif;font-size:12.800000190734863px"> guess I haven't make it clear.</span></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">
<br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">my goal is to :</div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">1) not to delete the file, not to chmod either</div>
<div style="font-family:arial,sans-serif;font-size:12.800000190734863px">2) don't change the file size either</div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">3) make the gzip file not being able to ungzipped and viewed - just to mess up the file and make it not usable (what I meant "destroy").</div>
<div style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">I finally use GNU "head" to delete the last a couple of lines like this:</div>
<div style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">head --lines=-100 myfile.gz > newfile.gz<br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">
<br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">after this , gzip can't recogize it. that's it.</div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br>
</div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">but , I doubt this is not the safe way, coz an gzip expert might be easily open the binary file and fixed the missed lines (I'm not sure).</div>
<div style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">maybe I better 'sort' the whole file, or, swap randomly some lines, so there is no way the file can be read...</div>
<div style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Jan 25, 2014 at 12:09 PM, Liam Proven <span dir="ltr"><<a href="mailto:lproven@gmail.com" target="_blank">lproven@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 25 January 2014 16:17, ping song <<a href="mailto:songpingemail@gmail.com">songpingemail@gmail.com</a>> wrote:<br>

> may sounds like a sin, but I just wanna know the best way to change a binary<br>
> file without actually open it (since it's really huge)?<br>
<br>
</div>Your subject says "destroy". To me that would seem to mean securely erase.<br>
<br>
But your body text seems to ask about editing it.<br>
<br>
As such, I do not understand what you mean.<br>
<br>
If you do mean secure erase, read this:<br>
<br>
<a href="http://askubuntu.com/questions/57572/how-to-delete-files-in-secure-manner" target="_blank">http://askubuntu.com/questions/57572/how-to-delete-files-in-secure-manner</a><br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
Liam Proven • Profile: <a href="http://lproven.livejournal.com/profile" target="_blank">http://lproven.livejournal.com/profile</a><br>
Email: <a href="mailto:lproven@cix.co.uk">lproven@cix.co.uk</a> • GMail/G+/Twitter/Flickr/Facebook: lproven<br>
MSN: <a href="mailto:lproven@hotmail.com">lproven@hotmail.com</a> • Skype/AIM/Yahoo/LinkedIn: liamproven<br>
Tel: <a href="tel:%2B44%2020-8685-0498" value="+442086850498">+44 20-8685-0498</a> • Cell: <a href="tel:%2B44%207939-087884" value="+447939087884">+44 7939-087884</a><br>
</font></span><div class="HOEnZb"><div class="h5"><br>
--<br>
ubuntu-users mailing list<br>
<a href="mailto:ubuntu-users@lists.ubuntu.com">ubuntu-users@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-users" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-users</a><br>
</div></div></blockquote></div><br></div>