[Linux-disciples] Deleting the first N lines of a file
Stephen R Laniel
steve at laniels.org
Wed Feb 8 20:55:49 EST 2006
Does anyone know of a very fast way to delete the first N
lines of a file? (That is, after the deletion, the file's
size will reduce from N + k to k lines.) Speed is rather
important here, so something like
head -n -N [filename] > end.txt
mv end.txt [filename]
won't do. [filename] may be very large -- on the order of
1GB.
--
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/20060208/5a3da950/attachment.pgp
More information about the Linux-disciples
mailing list