views:

78

answers:

2

Hi,

I have a script which uses killproc and procofpid commands and executes fine on a 64bit suse. But when I executed the script on 32bit redhat , I found that the above commands donot exist.

I don't have a 32bit Suse and 64bit redhat machines to test my script.

Is my guess right that on 64bit redhat the above commands should be available? Or are the above commands specific to Suse and redhat?

Thanks

A: 

I think those commands are distrib specifics: I have never seen them before. killproc should be a kind of kill but what is procofpid supposed to do?

In the title you speak about pidofproc, you can find this command under the pidof on most linux boxes.

Aif
A: 

The commands are unlikely to be portable. Actually this is first time I hear about them - but I guess your problem is to work with process by the name, not pid.

Check the man pgrep or man pkill - they are slightly bit more portable. They are part of procps package (where ps and top come from) and should be available on all Linux variants. They are also available on Solaris.

Dummy00001