Re: stopping a problematic process.
peter writes:
> Suppose
> strace LooseCannon
> produces 100 k lines of output but the user is primarily
> interested to see the first 1 k lines.
> strace LooseCannon | head --lines=1000
> might work but waste time and resources. How can the
> process be stopped without losing the strace output and
> before excessive waste?
strace LooseCannon 2>&1 | ( head -n1000 ; killall LooseCannon )
Note that this will leave the terminal in whatever state LooseCannon put
it in.
--
John Hasler
jhasler@newsguy.com
Elmwood, WI USA
Reply to: