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.
-- 
Rob Stockley
Manawatu
New Zealand

An avid user of RedHat Linux
Visit http://www.redhat.com

Reply via email to