如何将linux time命令的结果重定向到某个文件
发布时间:2021-02-21 00:34:07 所属栏目:Linux 来源:互联网
导读:我正在运行以下命令(在Ubuntu上) time wget http://localhost:8080/upLoading.jsp --timeout=0 并在命令行中获得结果 real 0m0.042suser 0m0.000ssys 0m0.000s 我尝试过以下操作: time -a o.txt wget http://localhost:8080/upLoad
我正在运行以下命令(在Ubuntu上) time wget 'http://localhost:8080/upLoading.jsp' --timeout=0 并在命令行中获得结果 real 0m0.042s user 0m0.000s sys 0m0.000s 我尝试过以下操作: time -a o.txt wget 'http://localhost:8080/upLoading.jsp' --timeout=0 并得到以下错误 -a: command not found 我想把结果重定向到一些文件.我怎样才能做到这一点? 解决方法您可以使用>>将任何逗号的stdout输出引导到文件.字符.要将输出附加到文件,请使用>> 请注意,除非明确地完成,输出到stderr将仍然进入控制台.将stderr和stdout引导到相同的输出流使用 command 2>&1 outfile.txt (with bash) 要么 command >& outfile.txt (with t/csh) 如果您正在使用bash All about redirection将为您提供有关重定向的更多细节和控制. (编辑:莱芜站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- linux内核 – 从linux内核模块访问串行端口
- linux – 什么是活动内存和非活动内存[已关闭]
- CentOS下升级Git1.7.1升级到Git2.2.1
- linux – 如何在没有运行dhcpd的情况下检查dhcpd.conf语法错
- linux – 如何使用RHEL5和DELL PERC控制器隔离Dell R710上的
- ruby-on-rails – git post-receive hook没有运行bundle in
- linux – 如何从外部模块导出符号?
- linux – tcpdump中“未知SSAP”和“未知DSAP”是什么意思?
- 如何在linux中的objective-c
- 涉及pthread时了解Linux调度