I want to get the result of time
command into a text file but it's not working it only put blank space in the text file.
I already tried this commands,
A-
$ x=`time`
$ echo $x > log.txt
$ cat log.txt
$
B-
$ time > log.txt
real 0m0.000s
user 0m0.000s
sys 0m0.000s
$ cat log.txt
$
C-
$ time > log.txt 2>&1
real 0m0.000s
user 0m0.000s
sys 0m0.000s
$ cat log.txt
$
What I really want is this.
$ time > log.txt
$ cat log.txt
real 0m0.000s
user 0m0.000s
sys 0m0.000s