On 09/28/1999 10:19 +1000, A mole wrote:
>>
>> Sounds like you want truncate() but I don't know any command line
>> interfaces to it. tail and head and it's friends will amount to a
>> copy/replace and replace too..
truncate will remove the data after a given offset from a file; seems like
that's the opposite of what's wanted here - saving the last part of the
file while trashing the beginning. I don't know of a libc call that can
do that without copying. Maybe I'm wrong, but I thought tail (given
the appropriate options, anyway) just does a seek and then a copy; it
doesn't have to read the entire front part of the file.
Also, dd (at least the version on RH6.0) has an iseek=n option which
will seek n blocks into the file before copying, instead of reading
all n blocks like skip does...
--
+------------------------------+--------------------------+
| Tim Walberg | Phone: 847-782-2472 |
| TERAbridge Technologies Corp | FAX: 847-623-1717 |
| 1375 Tri-State Parkway | [EMAIL PROTECTED] |
| Gurnee, IL 60031 | 800-SKY-TEL2 PIN 9353299 |
+------------------------------+--------------------------+
PGP signature