cutting mail spool

Alan Dayley alandd at consultpros.com
Fri Jul 29 11:10:23 MST 2005


Craig White said:
> I need to cut a users mail spool file down that now is 2.0G and mail box
> isn't working.
>
> I backed up her mail spool and emptied it out and now need a way to
> edit/cut it down - emacs won't open it because it exhausts the buffer.
>
> What's a simple command to say split the thing in half?

Off the top of my head so check 'man dd' for all the details...

dd if=spoolfile of=firsthalf bs=1024 \
count=<spoolfile size in K divided by 2>

That should take the first half and dump it into the file called
'firsthalf'.  Then to get the other half do...

dd if=spoolfile of=secondhalf bs=1024 \
skip=<spoolfile size in K divided by 2>

Hope that works for you.

Alan




More information about the PLUG-discuss mailing list