11

In some times I want quit from my running command in HBase shell, such as a scan ops usually take too much time.

So I want to stop running this command, but I don't want exit HBase shell.

The usual way for me to stop the running command, I used Ctrl+C, which can stop the running command, but it also exit from HBase shell, then I need to take more time to reEnter the HBase shell.

Is there any better way to solution for this?

tk421
  • 5,775
  • 6
  • 23
  • 34
Devin Wu
  • 121
  • 1
  • 8
  • 1
    Possible duplicate of [How to kill a scan operation in hbase shell](https://stackoverflow.com/questions/17047174/how-to-kill-a-scan-operation-in-hbase-shell) – David Jul 30 '17 at 17:52

1 Answers1

2

ctrl+s pauses the screen(console), ctrl+q resumes it back, it can be used to control console output of any application (like cat longfile.txt etc.) not just hbase shell.

https://en.wikipedia.org/wiki/Software_flow_control#Applications

Another alternative option is to use ctrl+z which suspends the current foreground job the impact will be a paused screen. To resume the suspended task just press fg to bring it back to foreground.

https://www.thegeekdiary.com/understanding-the-job-control-commands-in-linux-bg-fg-and-ctrlz/

Developer Guy
  • 2,318
  • 6
  • 19
  • 37
mbaxi
  • 1,301
  • 1
  • 8
  • 28