Chinaunix首页 | 论坛 | 博客
  • 博客访问: 516146
  • 博文数量: 118
  • 博客积分: 10028
  • 博客等级: 上将
  • 技术积分: 1820
  • 用 户 组: 普通用户
  • 注册时间: 2007-11-07 18:46
文章分类

全部博文(118)

文章存档

2009年(12)

2008年(106)

我的朋友

分类: LINUX

2008-08-29 00:50:47



因为有两个程序,需要测试下运行事件,所以要用到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

我只能说,麻烦......更深层的东西还没研究出来

阅读(721) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~