coolcommands.com - the search engine for unix sysadmins :: unix commands and scripts
Saturday October 1, 2016


 Home
 Search
 Advanced Search
 Category Search
 Affiliates
 Acknowledgements
 Cool Links

Username

Password

Remember me
Forgot your password?

Who's Online
We have 316 guests online

Hit Counter
18463942 Visitors

cool Statistics
coolcommands:1346
Categories:83
Total queries:661663
Members:22813





Category Search coolcommands.com
Select Category:


coolcommand

pgrep and pkill - how to terminate processes
Description

You can use the pgrep and pkill commands to identify and stop command processes that you no longer want to run. These commands are useful when you mistakenly start a process that takes a long time to run.

To terminate a process:

a. pgrep - to find out the PID(s) for the process(es).

b. pkill - followed by the PID(s).

The following example illustrates how to find all the processes with a specific name (xterm) and terminate the xterm process that was started last.

# pgrep xterm
17818
17828
17758
18210
# pkill -n 18210

Note: If you need to forcibly terminate a process, use the -9 option to the pkill command.
Example

pkill -9 -n xterm

Return to search results

Random coolcommands

coolcommand: how to find the process id by used port number in AIX
Example: for PID in $(netstat -Aan | grep *.5666 | cut -d " " -f1); do rmsock $PID tcpcb | cut -d " " -f9 | xargs ps ; done
[show me the details]
coolcommand: vxsd - how to join subdisks in Veritas Volume Manager
Example: vxsd join subdisk-88 subdisk-77 subdisk-99
[show me the details]
coolcommand: how to enable automatic notification of hardware errors in IBM AIX 5L
Example: diag
[show me the details]
coolcommand: metaclear - how to forcibly clear all metadevices in Solaris Volume Manager
Example: metaclear -a -f
[show me the details]

coolcommands.com - the search engine for UNIX sysadmins :: unix commands and scripts


Top 5 Submitters

lvo1167
audet37
kah00na32
Mariom24
lebjf00015

Top 5 Searches

Category General UNIX60702
Category AIX54472
Category Solaris54261
solaris23976
aix23448




Terms of Use
Privacy
Contact


 
coolcommands.com © 2016. All Right Reserved.
Programming by PRATTICO Consulting . Hosting by Apricusum