![]() |
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? |
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...
|
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.
|
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. |
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? |
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 |
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. |