truncate a 2gig file ?

Damien Elmes clug at repose.cx
Wed Nov 27 15:58:14 EST 2002


Simon Burton <simonb at webone.com.au> writes:

> I have a 2gig file (leunig's interview thismorning on ABC classic fm)
> that i only need the first 700mb of, i haven't the disk space to
> dd it, i'm looking to just chop off the last 1.3gig or so.
> Any commands to do this? Can clib do this?

What's clib?

Perhaps there's a nifty way to do this with dd and the skip= parameter, but I
don't know. The C library (was that what you meant?) provides truncate and
ftruncate() calls. These are available in perl and python too, so it should be
a two line job..

Regards,

-- 
Damien Elmes



More information about the linux mailing list