找回密码
 注册
搜索
热搜: 回贴
微赢网络技术论坛 门户 服务器 Linux/BSD 查看内容

time命令在bash中的一个小问题

2009-12-20 13:08| 发布者: admin| 查看: 110| 评论: 0|原作者: 夙瑶


因为有两个程序,需要测试下运行事件,所以要用到time命令....
刚开始只使用time commend 而没加参数,运行正常,后来想看看time有那些参数
所以man time
然后看到些参数如-f FORMAT还有-p等,试了下-f不能用,-p可以
输出错误是:bash: -f:找不到命令
百度了一下,原来是bash中有内建的命令time,而完整功能的time需要使用绝对路径/usr/bin/time
再往下看time的man page,下面也写的很清楚一段:
Users of the bash shell need to use an explicit path in order to run
the external time command and not the shell builtin variant. On system
where time is installed in /usr/bin, the first example would become
/usr/bin/time wc /etc/hosts
我只能说,麻烦......更深层的东西还没研究出来





最新评论

QQ|小黑屋|最新主题|手机版|微赢网络技术论坛 ( 苏ICP备08020429号 )

GMT+8, 2024-9-29 15:35 , Processed in 0.133447 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

返回顶部