linux – Gnu时间和格式输出
发布时间:2021-01-24 03:39:35 所属栏目:Linux 来源:互联网
导读:我想使用gnu时间来衡量一些小程序的运行时间.在这个人中,它写成: -f FORMAT, --format FORMATUse FORMAT as the format string that controls the output of time. See the below more information. 然后在例子中我们有: To run the command `ls -Fs a
|
我想使用gnu时间来衡量一些小程序的运行时间.在这个人中,它写成: -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,%S sys' ls -Fs -f: command not found real 0m0.134s user 0m0.084s sys 0m0.044s 我想知道问题在哪里,我在哪里犯错?我只想显示用户时间,这就是为什么我用时间输出格式来玩. 解决方法Bash为一个有一个shell内置命名时间.通过它的一种方式是键入/usr/bin/time.另一种方式是alias time = /usr/bin/time.另一方面,bash内置的环境变量TIMEFORMAT.(编辑:南阳站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- linux – 客户端向服务器发送延迟FIN ACK(500ms)
- Getting over the dangers of rm command in Linux---refer
- 当我在Linux中打开文件时应该什么时候使用O_CLOEXEC?
- Linux – 按名称的一部分对文件进行排序(无分隔符)
- LINUX实操:关于Linux进程管理
- 使用Postman工具/ cURL /在Chrome控制台中测试CORS
- 如何从Linux中的用户空间中找到变量的物理地址?
- linux – dhclient:“RTNETLINK回答:文件存在”是什么意思
- sed rare-delimiter(除了| /?…)
- linux – 我的shell脚本在exec之后停止
