Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Recently I installed lm-sensor for monitoring my CPU temperature. I am monitoring it by this command in the terminal:

while [ true ]; do sensors; sleep 1; done

But I need to access my temperature after I run some stress test on the CPU to analysis some data. Is there a command that can write my temperature into a 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. One 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.