You probably made a typo typing 'ftruncate', googling it worked for me ... <a href="http://linux.about.com/library/cmd/blcmdl2_ftruncate.htm">http://linux.about.com/library/cmd/blcmdl2_ftruncate.htm</a><br><br>But it truncates a file, trimming away stuff from the end. There's 'head', there's 'tail', there's 'ftruncate', just not what you want .. I'd call it rhead, 'reverse head', or maybe 'allbut'<br>
<br><br>Tom <br><br><div class="gmail_quote">O, n Fri, Oct 2, 2009 at 8:37 PM, Madison Kelly <span dir="ltr"><<a href="mailto:linux@alteeve.com">linux@alteeve.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Madison Kelly wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi all,<br>
<br>
Thus far, I've opened a file, read it in, shifted/ignored the first X number of line and then wrote out the resulting file. This works, but strikes me as horribly inefficient. Doubly so when the file could be larger than RAM.<br>
<br>
So then, is there a more efficient/faster way of saying "Delete the first X number of lines from file foo"?<br>
<br>
Thanks all!<br>
<br>
Madi<br>
</blockquote>
<br>
While talking about this with my boss and colleague, one mentioned "ftruncate" as a possible solution. There was debate about whether this was implemented in perl though. I did a google on the topic, but it thought it was a typo for 'truncate'. Does such a beast exist?<br>
<br>
Madi<br>
<br>
<br>
_______________________________________________<br>
toronto-pm mailing list<br>
<a href="mailto:toronto-pm@pm.org" target="_blank">toronto-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/toronto-pm" target="_blank">http://mail.pm.org/mailman/listinfo/toronto-pm</a><br>
</blockquote></div><br>