linux – Gnu时间和格式输出
发布时间:2021-01-24 03:49:23 所属栏目: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.(编辑:莱芜站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- ruby – 什么是一个很好的开源软件包,用于在大型Rails站点上
- linux – 如何在eclipse中输入unicode字符?
- linux – 如何使用此名称“-2”(以连字符开头)进入cd目录?
- linux – 如何检查文件是否存在并执行命令?
- 命令行 – zsh如何扩展globs?
- linux – make / home / tmp noexec nodev没有单独的patiti
- linux – Scons:如何强制重建?
- 如何从linux服务器上的大(30Gb)zip文件中提取文件
- 在Linux Mint中编译C程序时出错
- Install Tomcat 6 on CentOS or RHEL --转载
推荐文章
站长推荐
热点阅读