html tool

2018年12月6日星期四

转:strace 重定向


http://man.linuxde.net/strace

重定向输出
参数-o用在将strace的结果输出到文件中,如果不指定-o参数的话,默认的输出设备是STDERR,也就是说使用”-o filename”和” 2>filename”的结果是一样的。
[popexizhi: 一直郁闷 >file 不可以用,原来是 2>file :)]
# 这两个命令都是将strace结果输出到文件test.txt中
strace -c -o test.txt ./test
strace -c ./test  2>test.txt

没有评论:

发表评论