Shell redirection
Jason Shaw
grazer-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Wed Dec 21 20:06:59 UTC 2011
time CMD > /some/file 2>&1 works for me using
jshaw at jshaw:~$ bash --version
GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu)
jshaw at jshaw:~$ time ls -alh > /tmp/huh 2>&1
real 0m0.045s
user 0m0.000s
sys 0m0.000s
All of my output is in /tmp/huh and the time output is on the console.
-jason
On Wed, Dec 21, 2011 at 2:57 PM, Neil Watson <tlug-neil-8agRmHhQ+n2CxnSzwYWP7Q at public.gmane.org>wrote:
> Suppose I have a command:
>
> "time <other_cmd>"
>
> How can I redirect the other command's stdout and stderr but not the
> output of time?
>
> --
> Neil Watson
> Linux/UNIX Consultant
> http://watson-wilson.ca
> --
> The Toronto Linux Users Group. Meetings: http://gtalug.org/
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://gtalug.org/wiki/**Mailing_lists<http://gtalug.org/wiki/Mailing_lists>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gtalug.org/pipermail/legacy/attachments/20111221/d94f2e1f/attachment.html>
More information about the Legacy
mailing list