|
|
|
Step 1
=====
If you do ps auxww on a Linux machine you will get a list of all of the processes running on
that machine at the specific time :
ps auxww
Step 2
=====
Now, you need to decide which processes you wish to kill. you can do that with the help of
the grep function :
ps auxww | grep MyString
Where MyString is any string you wish to search for.
Step 3
=====
To get only the PID columns from the output we use the AWK program like this :
ps auxww | grep php | awk '{print $2}'
This will return the 2nd ($2) column from the output of the grep and ps functions.
Step 4
=====
This is the final kill :)
Add the kill command at the beginning and wrap the rest with ` ` :
kill `ps auxww | grep php | awk '{print $2}'`
This should do it.
berber |
|
| UDMSearch - a free search engine, indexing system. Categories : Search Engines, Linux, PHP, MySQL, ODBC | | | Easily Grant Temporary SSH Access to yourself when in remote location Categories : PHP, Linux, Cron, Security | | | How to set the date on a Linux machine. Categories : Linux | | | Free PHP script for Fetching contacts from Yahoo, Gmail and Lycos Categories : PHP, Apache, Linux, Web Applications, Email | | | Process killer for *nix Categories : PHP, CGI, Shell Scripting, Linux | | | PHP / FTP Web Authentication Scrip!
Please visit WWW.FLACCESS.COM
Categories : Apache, Ecommerce, FTP, Linux, Sockets | | | PHPBrowser - browsing linux file systems. Categories : PHP, Linux, Filesystem | | | Add a linux user from php Categories : Linux, PHP | | | ElfReader: An ELF (Executable and Linking Format) header information in PHP. Shows how to use the UNPACK function to read data. Categories : PHP, Linux, PHP Classes | |
|
|
|