<br>I believe that when  you run the "time" command within bash, it's running a built-in command.  It looks like that messes with the redirection for some reason (maybe someone else can explain it?).<br><br>If you run:<br>
/usr/bin/time dd....<br>You will probably get something more like you expect.<br><br>-Vic<br><br clear="all">Vic Gedris - <a href="http://vic.gedris.org">http://vic.gedris.org</a><br>Toronto, Ontario, Canada - <a href="http://www.junctiontriangle.ca">http://www.junctiontriangle.ca</a><br>
<br>
<br><br><div class="gmail_quote">On Mon, Nov 15, 2010 at 5:18 PM, Tyler Aviss <span dir="ltr"><<a href="mailto:tjaviss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org">tjaviss@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I'm  trying to time some commands and dump the output to a running<br>
log. For some reason unknown to me, the time command always seems to<br>
spit directly to my terminal, even when I'm redirecting stdout and<br>
stderr.<br>
<br>
Anyone know what's going on. For example, this should be dumping to a<br>
file, not my screen like...<br>
<br>
<br>
root@linux: ~# time dd if=/dev/zero bs=1k count=5000 > /tmp/foo.txt 2>&1<br>
<br>
real    0m0.037s<br>
user    0m0.000s<br>
sys     0m0.040s<br>
<br>
Perhaps I'm just short of caffeine and doing something incredibly<br>
dumb, but it doesn't seem right<br>
<br>
I checked the man-page and it says any arguments after the command<br>
following "time" are considered arguments of said command, so I<br>
thought perhaps it was interpreting it like<br>
<br>
time $( dd if=/dev/zero bs=1k count=5000 > /tmp/foo.txt 2>&1 )<br>
<br>
In that case, I should have be able to override using...<br>
<br>
echo $( time dd if=/dev/zero bs=1k count=5000 > /tmp/foo.txt 2>&1 )<br>
<br>
<br>
But I get the same thing. output to the screen and nada in /tmp/foo.txt<br>
Anyone know what's up with this?<br>
<font color="#888888">--<br>
The Toronto Linux Users Group.      Meetings: <a href="http://gtalug.org/" target="_blank">http://gtalug.org/</a><br>
TLUG requests: Linux topics, No HTML, wrap text below 80 columns<br>
How to UNSUBSCRIBE: <a href="http://gtalug.org/wiki/Mailing_lists" target="_blank">http://gtalug.org/wiki/Mailing_lists</a><br>
</font></blockquote></div><br>