Re-initializing a CNFS spool

Pål Baltzersen pal.baltzersen at imap.ost.eltele.no
Thu Aug 2 09:25:46 UTC 2001


Eric McDonald wrote:
> 
> Hi:
> 
> I need to re-initialize my CNFS spool, but I don't want to go through the
> lengthy process of deleting/restoring with mkfile (my version of linux
> doesn't allow direct I/O to a raw filesystem).
> 
> What's the best way to reset a CNFS spool file?
> 
> Eric

I guess this will do:

perl -e 'foreach(@ARGV){open(F,"+<$_")||die("$_: $!");print F
"\0"x1024;close(F);}' file ..

It (re)sets the 1024 1.st chars of file (and ..) to the NULL character

-- 
Hilsen/Regards
Pål

-------------------------------------------------------------
Addr:	Pål Baltzersen, ElTele Øst AS, Fredrik Selmers vei 2,
	P.O. Box 6299 Etterstad, N-0603 Oslo, Norway
Phone:	+47 23 18 10 00		Direct:	+47 23 18 11 74
Fax:	+47 23 18 10 01		Mobile:	+47 93 08 11 74
Mail:	pb at ost.eltele.no	pal.baltzersen at ost.eltele.no


More information about the inn-workers mailing list