问题
This is probably a more general question: Many tools in linux have their own shells. In my case, I use pig and hbase. Sometimes when you execute a command in the shell, it returns a lot of results and I want to cancel it. Let's say for example you do cat 'a.txt' and that file is huge. What's the best way to cancel it without exiting the shell. If I press Ctrl+c it'll exit the shell.
回答1:
kill <job_id>
will kill a mapreduce job `with the specified id. It's not exactly what you are looking for but there is no easier solution that I know off.
来源:https://stackoverflow.com/questions/14043805/how-to-cancel-command-in-grunt-shell