title: How to redirect the output of the time command to a file in Linux?
body: <p>Just a little question about timing programs on Linux: the time command allows to
  measure the execution time of a program:</p>
  
  <pre><code>[ed@lbox200 ~]$ time sleep 1
  
  real    0m1.004s
  user    0m0.000s
  sys     0m0.004s
  </code></pre>
  
  <p>Which works fine. But if I try to redirect the output to a file, it fails.</p>
  
  <pre><code>[ed@lbox200 ~]$ time sleep 1 &gt; time.txt
  
  real    0m1.004s
  user    0m0.001s
  sys     0m0.004s
  
  [ed@lbox200 ~]$ cat time.txt 
  [ed@lbox200 ~]$ 
  </code></pre>
  
  <p>I know there are other implementations of time with the option -o to write a file but
  my question is about the command without those options.</p>
  
  <p>Any suggestions ?</p>