[Linux-disciples] Deleting the first N lines of a file
Stephen R Laniel
steve at laniels.org
Thu Feb 9 08:55:39 EST 2006
On Wed, Feb 08, 2006 at 09:47:39PM -0500, Adam Rosi-Kessel wrote:
> Why does it need to be so fast? Maybe you're asking the wrong question.
The large file we're working with is an Apache logfile.
Doing the 'head' command and then overwriting the logfile
will lose us some hits. We'd prefer not to lose any hits at
all, which is why we'd like to just pull the top N lines off
the file, write them to another file, and then delete the
top N lines off the original file.
--
Stephen R. Laniel
steve at laniels.org
Cell: +(617) 308-5571
http://laniels.org/
PGP key: http://laniels.org/slaniel.key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20060209/7eff1c2c/attachment-0001.pgp
More information about the Linux-disciples
mailing list