[CentOS] time command

Tue Apr 10 17:38:52 UTC 2007
Luciano Miguel Ferreira Rocha <strange at nsk.no-ip.org>

On Tue, Apr 10, 2007 at 01:34:23PM -0400, Jerry Geis wrote:
> Hi
> 
> I am wanting to time how long it takes a couple commands to run.
> I can do "time command" and it tells me.
> How do I do multple commands at a time.
> I tried:
> time command; command
> no good
> time "command; command"
> no good

If using shell builtin time:
time { cmd1; cmd2; }

or

time ( cmd1; cmd2 )

If using external command:
/usr/bin/time sh -c "cmd1; cmd2"

-- 
lfr
0/0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.centos.org/pipermail/centos/attachments/20070410/0e547553/attachment-0005.sig>