LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Safely kill precess (https://www.linuxquestions.org/questions/linux-newbie-8/safely-kill-precess-784173/)

konzo 01-23-2010 03:41 AM

Safely kill precess
 
I have simple question.

I am reading some documents with various programs e.g. more, less, cat...

When type ps it appear that they stay in the memory.

Is it safely to kill them or even kill -9, when they continue to stay in memory?

neonsignal 01-23-2010 03:56 AM

It is okay to kill anything that doesn't make changes to files, such as the programs you mentioned. However, they should be exiting by themselves...

rich_c 01-23-2010 04:00 AM

What's the 'kindest' way of using kill? I'd like to be able to stop and restart apps remotely. As they'd be apps that are running OK in the first place, a way of letting them exit gracefully would be good.

honeybadger 01-23-2010 04:02 AM

How do you kill the process. I use htop to kill a process. Then there is the long way of using ps -e and then looking at the id and then killing the process.
However a process once killed should stop running after a few seconds.

konzo 01-23-2010 04:30 AM

I type ps and then kill with the PID number as argument.

How must I exit from less, cat and other tools for viewing. I use ctrl+z. Is that ok?

EricTRA 01-23-2010 04:44 AM

Hi,

There's your problem, right there! CTRL-Z sends the process to the background, it doesn't terminate it. To stop processes like more, less, and so on, just type q to 'quit'. That's all.

Kind regards,

Eric

r3sistance 01-23-2010 04:51 AM

Also for the usage of kill. I found this nice little link that gives an nice of example of how to kill and when to use more extreme kill methods.

http://speculation.org/garrick/kill-9.html


All times are GMT -5. The time now is 10:16 PM.