Stop watching the output of a particular program after using watch command?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have come to know that we can use watch
command to monitor the output of other command and it prints the output every 2 seconds by default, which is really useful.
I start to use it to monitor the output of nvidia-smi
, for example. But now I do not know how to quit the program (stop monitoring the output of nvidia-smi
). I tried to press q
and there is no response.
Searching the internet with similar title gives me no clue. There are only some tutorials on how to use watch
and its options and I can not find a way to stop the command. I am stuck here.
linux watch
add a comment |Â
up vote
0
down vote
favorite
I have come to know that we can use watch
command to monitor the output of other command and it prints the output every 2 seconds by default, which is really useful.
I start to use it to monitor the output of nvidia-smi
, for example. But now I do not know how to quit the program (stop monitoring the output of nvidia-smi
). I tried to press q
and there is no response.
Searching the internet with similar title gives me no clue. There are only some tutorials on how to use watch
and its options and I can not find a way to stop the command. I am stuck here.
linux watch
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have come to know that we can use watch
command to monitor the output of other command and it prints the output every 2 seconds by default, which is really useful.
I start to use it to monitor the output of nvidia-smi
, for example. But now I do not know how to quit the program (stop monitoring the output of nvidia-smi
). I tried to press q
and there is no response.
Searching the internet with similar title gives me no clue. There are only some tutorials on how to use watch
and its options and I can not find a way to stop the command. I am stuck here.
linux watch
I have come to know that we can use watch
command to monitor the output of other command and it prints the output every 2 seconds by default, which is really useful.
I start to use it to monitor the output of nvidia-smi
, for example. But now I do not know how to quit the program (stop monitoring the output of nvidia-smi
). I tried to press q
and there is no response.
Searching the internet with similar title gives me no clue. There are only some tutorials on how to use watch
and its options and I can not find a way to stop the command. I am stuck here.
linux watch
edited Dec 6 '17 at 9:11
asked Dec 6 '17 at 8:48
jdhao
1468
1468
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
4
down vote
accepted
From man watch
:
By default, watch will run until interrupted.
The key words are "until interrupted", which basically can be interpreted as until (but not limited to) the following happening:
- The user (you) pressed CTRL+C in the terminal.
- The system restarted.
- The process was issued a
kill
request.
I am curious to know why there is no shortcut to useq
to stop watching, just like when we are usingless
orman
command. A lot of command support the use ofq
to quit.
â jdhao
Dec 6 '17 at 9:15
I am not one of the programmers and I can not answer for them. As far as I understand, the source code forwatch
is available and you should be able to either fork it and create your own version that includes the option to pressQ
to quit or extend it like others have by submitting a patch or getting directly involved in the program development.
â Tigger
Dec 6 '17 at 10:02
@Hao, note that reacting to a signal (generated by Ctrl+C) and reading tokens fromstdin
are very different code paths.less
andman
accept a variety of keystroke commands;q
is just another among several.watch
accepts no keystroke commands, so it would be functionality added only for quit.
â user4556274
Dec 6 '17 at 13:15
add a comment |Â
up vote
1
down vote
Press CRTL+C to stop the command
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
accepted
From man watch
:
By default, watch will run until interrupted.
The key words are "until interrupted", which basically can be interpreted as until (but not limited to) the following happening:
- The user (you) pressed CTRL+C in the terminal.
- The system restarted.
- The process was issued a
kill
request.
I am curious to know why there is no shortcut to useq
to stop watching, just like when we are usingless
orman
command. A lot of command support the use ofq
to quit.
â jdhao
Dec 6 '17 at 9:15
I am not one of the programmers and I can not answer for them. As far as I understand, the source code forwatch
is available and you should be able to either fork it and create your own version that includes the option to pressQ
to quit or extend it like others have by submitting a patch or getting directly involved in the program development.
â Tigger
Dec 6 '17 at 10:02
@Hao, note that reacting to a signal (generated by Ctrl+C) and reading tokens fromstdin
are very different code paths.less
andman
accept a variety of keystroke commands;q
is just another among several.watch
accepts no keystroke commands, so it would be functionality added only for quit.
â user4556274
Dec 6 '17 at 13:15
add a comment |Â
up vote
4
down vote
accepted
From man watch
:
By default, watch will run until interrupted.
The key words are "until interrupted", which basically can be interpreted as until (but not limited to) the following happening:
- The user (you) pressed CTRL+C in the terminal.
- The system restarted.
- The process was issued a
kill
request.
I am curious to know why there is no shortcut to useq
to stop watching, just like when we are usingless
orman
command. A lot of command support the use ofq
to quit.
â jdhao
Dec 6 '17 at 9:15
I am not one of the programmers and I can not answer for them. As far as I understand, the source code forwatch
is available and you should be able to either fork it and create your own version that includes the option to pressQ
to quit or extend it like others have by submitting a patch or getting directly involved in the program development.
â Tigger
Dec 6 '17 at 10:02
@Hao, note that reacting to a signal (generated by Ctrl+C) and reading tokens fromstdin
are very different code paths.less
andman
accept a variety of keystroke commands;q
is just another among several.watch
accepts no keystroke commands, so it would be functionality added only for quit.
â user4556274
Dec 6 '17 at 13:15
add a comment |Â
up vote
4
down vote
accepted
up vote
4
down vote
accepted
From man watch
:
By default, watch will run until interrupted.
The key words are "until interrupted", which basically can be interpreted as until (but not limited to) the following happening:
- The user (you) pressed CTRL+C in the terminal.
- The system restarted.
- The process was issued a
kill
request.
From man watch
:
By default, watch will run until interrupted.
The key words are "until interrupted", which basically can be interpreted as until (but not limited to) the following happening:
- The user (you) pressed CTRL+C in the terminal.
- The system restarted.
- The process was issued a
kill
request.
answered Dec 6 '17 at 8:57
Tigger
1,916812
1,916812
I am curious to know why there is no shortcut to useq
to stop watching, just like when we are usingless
orman
command. A lot of command support the use ofq
to quit.
â jdhao
Dec 6 '17 at 9:15
I am not one of the programmers and I can not answer for them. As far as I understand, the source code forwatch
is available and you should be able to either fork it and create your own version that includes the option to pressQ
to quit or extend it like others have by submitting a patch or getting directly involved in the program development.
â Tigger
Dec 6 '17 at 10:02
@Hao, note that reacting to a signal (generated by Ctrl+C) and reading tokens fromstdin
are very different code paths.less
andman
accept a variety of keystroke commands;q
is just another among several.watch
accepts no keystroke commands, so it would be functionality added only for quit.
â user4556274
Dec 6 '17 at 13:15
add a comment |Â
I am curious to know why there is no shortcut to useq
to stop watching, just like when we are usingless
orman
command. A lot of command support the use ofq
to quit.
â jdhao
Dec 6 '17 at 9:15
I am not one of the programmers and I can not answer for them. As far as I understand, the source code forwatch
is available and you should be able to either fork it and create your own version that includes the option to pressQ
to quit or extend it like others have by submitting a patch or getting directly involved in the program development.
â Tigger
Dec 6 '17 at 10:02
@Hao, note that reacting to a signal (generated by Ctrl+C) and reading tokens fromstdin
are very different code paths.less
andman
accept a variety of keystroke commands;q
is just another among several.watch
accepts no keystroke commands, so it would be functionality added only for quit.
â user4556274
Dec 6 '17 at 13:15
I am curious to know why there is no shortcut to use
q
to stop watching, just like when we are using less
or man
command. A lot of command support the use of q
to quit.â jdhao
Dec 6 '17 at 9:15
I am curious to know why there is no shortcut to use
q
to stop watching, just like when we are using less
or man
command. A lot of command support the use of q
to quit.â jdhao
Dec 6 '17 at 9:15
I am not one of the programmers and I can not answer for them. As far as I understand, the source code for
watch
is available and you should be able to either fork it and create your own version that includes the option to press Q
to quit or extend it like others have by submitting a patch or getting directly involved in the program development.â Tigger
Dec 6 '17 at 10:02
I am not one of the programmers and I can not answer for them. As far as I understand, the source code for
watch
is available and you should be able to either fork it and create your own version that includes the option to press Q
to quit or extend it like others have by submitting a patch or getting directly involved in the program development.â Tigger
Dec 6 '17 at 10:02
@Hao, note that reacting to a signal (generated by Ctrl+C) and reading tokens from
stdin
are very different code paths. less
and man
accept a variety of keystroke commands; q
is just another among several. watch
accepts no keystroke commands, so it would be functionality added only for quit.â user4556274
Dec 6 '17 at 13:15
@Hao, note that reacting to a signal (generated by Ctrl+C) and reading tokens from
stdin
are very different code paths. less
and man
accept a variety of keystroke commands; q
is just another among several. watch
accepts no keystroke commands, so it would be functionality added only for quit.â user4556274
Dec 6 '17 at 13:15
add a comment |Â
up vote
1
down vote
Press CRTL+C to stop the command
add a comment |Â
up vote
1
down vote
Press CRTL+C to stop the command
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Press CRTL+C to stop the command
Press CRTL+C to stop the command
answered Dec 6 '17 at 8:56
BANJOSA
1485
1485
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f409132%2fstop-watching-the-output-of-a-particular-program-after-using-watch-command%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password