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

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -