我想用gnu时间测量一些小.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
我想知道问题出在哪里,我在哪里弄错了?我只是想显示用户时间,这就是为什么我玩弄时间输出格式.
min*_*ret 13
Bash for one有一个内置的shell命名time.克服它的一种方法是输入command time.另一种方式是time.另一方面,bash builtin尊重环境变量$PATH.
| 归档时间: | 
 | 
| 查看次数: | 5226 次 | 
| 最近记录: |