On 5 Jul 2006, in the Usenet newsgroup comp.os.linux.networking, in article
<(E-Mail Removed) .com>,
(E-Mail Removed) wrote:
>I am trying to kill a network process...
What _kind_ of a network process? What distribution? What release?
>I have been told to use the following commands:
>l *.pid
>cat *.pid
>
>Can anyone tell me more about these commands?
Then you should be asking the person who told you to use those commands.
What it _looks_ like is that the first command _might_ be something that
gives a directory listing - possibly of '/var/run/'
[compton ~]$ ls /var/run/*.pid | column
/var/run/atd.pid /var/run/inetd.pid /var/run/sendmail.pid
/var/run/crond.pid /var/run/klogd.pid /var/run/syslogd.pid
[compton ~]$
while the second would show the contents of all of those files. That by
itself would not kill any process.
>Is it common that the PID of all processes are stored in a text file?
No. Depending on your distribution, you might have a 'pidof' command (which
is normally a link to killall5 - READ THE MAN PAGE FIRST), or your system
init scripts may have a 'pidofproc()' function.
Assuming a normally running system, you can determine the PID of a process
using 'ps auwx' and then use kill to terminate that specific process.
Old guy