linux - How redirect time gcc output to a file? -
i using command :
time gcc -lm test.c > time.txt
to determine compilation time etc. , write them file.but when use above command nothing gets printed file?
where going wrong?
it depends on shell use. in bash, time
builtin , cannot redirected. have use subshell redirect standard error:
(time gcc -lm test.c ) 2> time.txt
Comments
Post a Comment