Re: Redirect output from time command to file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/18/05, Marcelino Mata <mmata@xxxxxxxxxxxxxx> wrote:
> Running RHEL 3.0 x86_64 and RH9.
>
>  I have searched the internet for over 2 hours looking for this
> information...this should be easy...according to various sites it should
> just work.
>
> I am trying to log the time a command takes to a log file with the
> "time" command.  For example, the time below measures how long time it
> took for wc to count the text in /etc/hosts.
>
> # time wc /etc/hosts
>      72     332    2762 /etc/hosts
>
> real    0m0.002s
> user    0m0.000s
> sys     0m0.000s
>
> According to time manual I can redirect actual values to a file with the
> -o or --output option.  Example shown below, long it took the wc command
> to perform the operation:
>
> time --output=log wc /etc/hosts
>
> However, all I get is this
>
> -bash: --output=log: command not found

Try /usr/bin/time to run the GNU version of time instead of the shell
built-in version.

John

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux