【发布时间】:2012-03-15 07:35:20
【问题描述】:
我想使用 gnu time 来测量一些小的 .c 程序的运行时间。在男人中写道:
-f FORMAT, --format FORMAT
Use FORMAT as the format string that controls the output of time. See the below more information.
那么在例子中我们有:
To run the command `ls -Fs' and show just the user, system, and total time:
time -f "%E real,%U user,%S sys" ls -Fs
但是当我尝试从示例中发出此命令时,我得到:
time -f '%E real,%U user,%S sys' ls -Fs
-f: command not found
real 0m0.134s
user 0m0.084s
sys 0m0.044s
我想知道问题出在哪里,我在哪里犯了错误?我只是想向用户显示时间,这就是我玩弄时间输出格式的原因。
【问题讨论】: