除了使用 Ctrl + C 之外,如何在 linux 中停止正在运行的 R 命令? [英] How can I stop a running R command in linux other than with Ctrl + C?

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

问题描述

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.

解决方案

I have had the problem you mention. Ctrl + C will work when R is able to realize "Oh, this guy/gal 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?".

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 it stops the process.

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.

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

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