Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am having a weird problem with the time command. When I try and run

$ time rspec spec

It should return

Finished in 15.78 seconds
75 examples

real    0m22.334s
user    0m17.952s
sys     0m2.643s

But it doesn't return anything, if I run the same command via /usr/bin/time it returns

    5.71 real         4.51 user         0.89 sys

I have no idea why. I am running zsh

share|improve this question
1  
Your desired output format looks exactly like bash's. –  Daniel Beck Sep 16 '13 at 21:11
    
@DanielBeck yes! you are correct any idea on how to replicate that in zsh? –  Josh Crowder Sep 16 '13 at 21:33

1 Answer 1

up vote 2 down vote accepted

Try changing TIMEFMT:

$ zsh
$ TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S'; time sleep 1

real    1.01s
user    0.00s
sys     0.00s
share|improve this answer
    
thanks! This worked although I have to wrap commands in () –  Josh Crowder Sep 20 '13 at 22:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.