如何停止运行R命令在linux除ctrl + c? [英] How to stop a running R command in linux other than ctrl+c?

查看:621
本文介绍了如何停止运行R命令在linux除ctrl + c?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在linux下以交互模式运行R,并且错误地键入了一个永远运行的命令。我通常停止它使用ctrl + c。但它不工作的所有时间。当它不工作,有没有另一种方式?

I'm running R in interactive mode under linux, and mistakenly typed in a command that takes forever to run. I usually stop it using ctrl+c. But it doesn't work all the time. When it doesn't work, is there another way? I don't want to kill the R session to start over either.

感谢。

推荐答案

我有你提到的问题。 能够实现哦,这家伙想要我停止运行那个特定的命令, ctrl + c 。但是,通常 R 不能这样做。所以你必须运行 ctrl + \ (注意,它是一个反斜杠不是正斜杠)。这告诉 linux hey, R

I have had the problem you mention. ctrl+c will work when R is able to realize "oh this guy wants me to stop running that particular command." However, often R cannot do that. So you have to run ctrl+\ (note that it's a backslash not a forward slash). This tells linux "hey, R is not listening to me, can you stop running R?".

请尝试 ctrl + c 第一,因为如果它工作,你仍然会有你的 R 会话。如果它不工作,并且你 ctrl + \ 你会失去你的 R 会话,但至少停止

Try ctrl+c first because if it works you will still have your R session. If it doesn't work, and you do ctrl+\ you will lose your R session but at least stop the process.

如果这也不行,那么我会建议一个 killall R kill -9 [PID] 您可以通过运行 pus aux 找到PID。

If that doesn't work either, then I would suggest a killall R or a kill -9 [PID] where you find the PID by running pus aux.

这篇关于如何停止运行R命令在linux除ctrl + c?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆