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.

comamnd line:

time myprocess

outputs its results:

OUTPUT FROM MY PROCESS

real    0m1.954s
user    0m0.086s
sys     0m0.052s

But if I do

time myprocess > outputfile.txt

my outputFiel.txt will include only the output from my process. Not the time results.

How do I output everything into my file, including the output from "time"?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Use parentheses to format the command as one block.

(time myprocess) &> outputfile.txt

Bash Redirection

share|improve this answer
    
thanks! worked nicely. –  ron M. Nov 6 '13 at 23:09

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.