关于Linux上的程序计时,有一个小问题:time命令允许
[ed@lbox200 ~]$ time sleep 1
real 0m1.004s
user 0m0.000s
sys 0m0.004s
这很好用.但如果我试图将输出重定向到一个文件,它就会失败.
[ed@lbox200 ~]$ time sleep 1 > time.txt
real 0m1.004s
user 0m0.001s
sys 0m0.004s
[ed@lbox200 ~]$ cat time.txt
[ed@lbox200 ~]$
我知道还有其他时间实现选项-o来编写文件,但是
有什么建议吗?