Why sync three times

geoff geoff at burl.UUCP
Sat May 25 03:16:03 AEST 1985


> People have been asking why type sync three times before halting a machine.
> I believe the answer is the same as why people say
> 
> 	"Testing Testing 1 2 3" (ie, count to three) into microphones.
> 
> 	Yours for better rumors,
> 	-Mike

How about this one?  The 'sync' program (what runs when you type 'sync')
just calls the 'sync' system call (I peeked).  It says in the manual under
sync(2) that the writing to disk may not be completed when sync returns.
Hence typing sync 3 times provides a delay after which the file system
should be up to date.  Running 'fortune' the second and third times would
be as effective and a whole lot more fun.

I think the above is true, but am not positive.  Comments?

	geoff sherwood



More information about the Comp.unix.wizards mailing list