Of course I know the function strace
have a option -o
,which can export the trace result into a local file.But I want to use the redirect command(>) here.
strace -e trace=file lastb|grep " = 0" >file
There is a logical problem here.The >
follow the lastb.That is not my intention.Even I use a bracket cannot improve it like following:
(strace -e trace=file lastb)|grep " = 0" >file
So how to use the redirect command(>) to get a file contain the trace information?
strace
not have a-o filename
option for capturing trace output tofilename
? – steeldriver Jul 09 '17 at 13:21