[PLUG] Making instant tee
Rich Burroughs
rich at richburroughs.com
Mon Mar 19 01:43:33 UTC 2012
On Sunday, March 18, 2012, website reader <website.reader3 at gmail.com> wrote:
> How can I change the "tee" command so that it stops buffering and displays
> the immediate results?
>
> Or is this better done by the "tail -f" command?
>
> I wish there was an option to tee so that the user could see things
> happening right away, rather than wait for a 4K or some size buffer to
fill
> up, which might take hours, in some cases.
Are you saying it's buffering what you see in your terminal, or what's
written to the file, or both?
I can't recall really seeing it buffer like that but maybe I'm just not
paying close enough attention. It's always seemed pretty real time to me.
Can you post an example of a command line where you'd see this happening?
Generally for things like moinitoring log output in real time, I'll use
tail -f and pipe that through other commands like grep if I need to.
I'll use tee for something like running a script, where I want to see
stdout but also have it captured to a file I can refer to later.
Rich
More information about the PLUG
mailing list