Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Recently i install lm-sensor for monitoring my CPU temperature. I am monitoring it by this command in terminal : while [ true ]; do sensors; sleep 1; done but i need access my temperature after i run some stress test on CPU to analysis some data. Is there any command that can write my temperature into file during my stress test?


share|improve this question

1 Answer 1

up vote 1 down vote accepted

you can redirect the output of the sensors command to a file using the >> operator of the shell

while [true]
   sensors >> */your/file/here*
   sleep 1

The >> operator redirects standard output of a command to a file so in this case it will write the output of sensors to the file you name. 1 second is pretty frequent so you'll want to make sure you don't leave this process running.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.