Since
sparkle asked for an efficient method that works even on large files (2GB is sometimes the next limit), I agree with
Crackers2 suggestion that will work well since it preserves disk space and implies a minimal amount of copy operations. But in case the header has a different size than the other records, order is important, or in case a copy of the file is still required, I would suggest to give that task away to a tool that is optimised for that kind of operations. Where available, a
system(...)-call to
tail or
dd might be worth consideration.