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

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I ran following command on linux terminal hdparm -T -t /dev/sda. It is not giving any output and i am unable to stop this by ctrl+c and ctrl+z. How to terminate this program with out restarting system?

share|improve this question
up vote 2 down vote accepted

Both ctrl+c (SIGINT) and ctrl+z (SIGTSTP) can be handled (or ignored) by processes. If you are sure that you want to kill the process then you need to use SIGTERM (can be handled by processes) first and SIGKILL, if that doesn't work.

Open another terminal and do a ps aux|grep hdparm to get the process id and then pass that process id to kill command. If you are sure that there is only one hdparm process that is running then you can do the following as well:

# this will pass SIGTERM
ps aux | grep hdparm | awk '{print $2}' | xargs sudo kill 

# this will pass SIGKILL
ps aux | grep hdparm | awk '{print $2}' | xargs sudo kill -9
share|improve this answer
isn't it print $1? – eazar001 Jan 30 '14 at 7:51
I can't open another terminal, It's a single terminal system(Embedded system) – Chinna Jan 30 '14 at 7:53
@eazar001 $1 is username – Aditya Patawari Jan 30 '14 at 8:42
@Chinna Usually for Linux you can do ALT+CTRL+F6 to open alternate terminal. Replace F6 with anything between F2 to F7. – Aditya Patawari Jan 30 '14 at 8:42
@Chinna, oh right, sorry I was thinking about ps ax – eazar001 Jan 30 '14 at 9:05

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.