On Thu 10 May 2007 09:23:52 NZST +1200, Nick Rout wrote:

> I feel I should know this, but nothing comes to mind. I need to truncate a
> 6.5G file to the first 2G of the file. The remainder can be thrown away.

> man [2|3p] truncate seems to reveal a c function, but I cannot find a
> command line equivalent.

My scriptutils package contains truncate.pl, which is handy for that sort of
job and which contains a roundabout-way interface to said C function. It is
also useful for creating empty sparse files of any size (needed e.g. for
loop-device filesystem creation).

Volker

-- 
Volker Kuhlmann                 is list0570 with the domain in header
http://volker.dnsalias.net/     Please do not CC list postings to me.

Reply via email to