On Tue, 24 Jun 2003 20:16:15 +1200
Rob Stockley <[EMAIL PROTECTED]> wrote:

> On Tue, 2003-06-24 at 20:06, Rob Stockley wrote:
> > If it's a text file then how about,
> > 
> > cat your_file | tail --bytes=N > your_file
> > 
> > where N is the number of bytes to be kept. Can piping be made to
> > operate serially using a temporary file? Perhaps this is a little
> > dangerous to be writing back to the same file. Maybe a short script?
> > Rambling again.... :>
> 
> Nope needed to be
> 
> cat your_file | tail --bytes=N > /tmp/tempfile ; mv /tmp/tempfile
> your_file
> 
> Probably still not quite right.

the man is talking +2G files. that method is likely to take a long time
and create a lot of time consuming disk activity, and maybe blow your
/tmp file system

> -- 
> Rob Stockley
> Manawatu
> New Zealand
> 
> An avid user of RedHat Linux
> Visit http://www.redhat.com
> 
> 


-- 

Reply via email to