[ale] Need to edit down a 2GB file.
jloden at toughguy.net
Fri Apr 15 07:03:57 EDT 2005
If you literally only need the top part of the file, you could use the "head"
command and specify the number of lines, like this:
head -n 1000 mbox > newmbox (for 1000 lines)
then you'd need to check to make sure it ends somewhere safe, like the end of
a message, of course.
or you could use the 'split' command, to split the file into chunks, and use
an editor to remove the stuff you don't need, and cat them all back together.
On Friday 15 April 2005 06:10 am, Benjamin Scherrey wrote:
> I have a KMail MBox mail file that grew to over 2GB accidently and it
> apparently can't handle that. As soon as i try to dl new email the
> program exits and moving emails to another folder then compressing the
> folder is not reducing its size. Can someone recommend a common linux
> editor that will let me lop off the top of the file and save it so it'll
> be below my, apparent, 2Gb limit?
> thanx & later,
> Ben Scherrey
> Ale mailing list
> Ale at ale.org
More information about the Ale