Date: Sat, 2 Dec 2000 14:41:05 +0100 From: Erik Trulsson <ertr1013@student.uu.se> To: Sue Blake <sue@welearn.com.au> Cc: freebsd-questions@freebsd.org Subject: Re: "unbuffered" ? Message-ID: <20001202144104.A535@student.uu.se> In-Reply-To: <20001202224250.L377@welearn.com.au>; from sue@welearn.com.au on Sat, Dec 02, 2000 at 10:42:52PM %2B1100 References: <20001202224250.L377@welearn.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Dec 02, 2000 at 10:42:52PM +1100, Sue Blake wrote: > I've seen this sort of thing in several man pages: > > cat(1) > -u The -u option guarantees that the output is unbuffered. > tr(1) > -u The -u option guarantees that any output is unbuffered. > tee(1) > ... The output is unbuffered. > > > What does unbuffered mean, and how is it useful to know or manipulate that? > Unbuffered means it is not buffered. :-) Alright, so what is buffered output I hear you ask. When output is buffered it means the program saves up several bytes before writing all of them. The reason for this is that it is much more efficient to write 100 bytes at once than doing 100 calls each of which only writes one byte. Sometimes, especially when displaying text on the screen, you want programs to write stuff immediately instead of waiting for more output. When writing to a normal disk file on the other hand you usually want buffered output. Basically unbuffered output gives better interactive performance but has higher overhead. -- <Insert your favourite quote here.> Erik Trulsson ertr1013@student.uu.se To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001202144104.A535>