linux – Gnu时间和格式输出
发布时间:2021-01-24 04:06: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.(编辑:台州站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- linux – 按日期字段在bash中排序日志
- Linux内核:来自“open”系统调用的printk不起作用
- linux – GNU排序命令的行为(带有非字母ASCII字符,如点或分
- linux – 如何仅清理buildroot中的目标
- linux – cronjob计时是从它创建的那一刻开始还是预设的?
- LINUX实操:Python升级导致yum不可用 “ No module named y
- linux – 纳米编辑器换行
- linux – 什么是tcp_autocorking(tcp自动软木塞)
- linux – 不能“git pull” – 主机密钥验证失败
- LINUX入门:Centos7.2 启用iptables
推荐文章
站长推荐
- Handling of asynchronous events---reference
- BEA-141150 - An error occurred while preparin
- Linux:将100万个文件移动到基于前缀的创建文件夹
- linux:禁用使用环回并通过线路在一个comp的2个e
- linux – i386:x64-32 vs i386 vs i386:x86_64
- regex – sed – 删除大型csv文件中引号内的引号
- linux – 在RPI上使用cec-client关闭电视
- linux – 将给定文件的第一个字母转换为小写
- linux – 如何正确使用Siege来对GET请求进行基准
- vmstat 命令详解
热点阅读