I run the following code unsuccessfully
sudo killall %4
where %4 is my Vim session.
How can you terminate a job without foregrounding it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I believe you want “kill” instead of “killall”. I tested under tcsh like this:
Furthermore, I doubt this would work with sudo because sudo would invoke a new shell, wouldn’t it? And in that shell, %4 would not be defined.
If you really need to sudo, you can try this: