Sponsored Content
Full Discussion: Killall script?
Top Forums Shell Programming and Scripting Killall script? Post 70642 by google on Monday 2nd of May 2005 07:38:12 PM
Old 05-02-2005
What shell are you using?


This is a simple enough script to write. See man ps for how to get the process ID. After that, simply loop through the process ID's and kill them ( man kill )assuming you are root (you are not going to be able to kill them otherwise).
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

using killall command

hi all... I investigate if exists some script so that when unix run an application (in this case backup's), so after of that does run killall command to all users connected, or if it is possible to be put in crontab... I wait for and they help me so I do not have much knowledge in programming....... (2 Replies)
Discussion started by: chanfle
2 Replies

2. Shell Programming and Scripting

create a shell script that calls another script and and an awk script

Hi guys I have a shell script that executes sql statemets and sends the output to a file.the script takes in parameters executes sql and sends the result to an output file. #!/bin/sh echo " $2 $3 $4 $5 $6 $7 isql -w400 -U$2 -S$5 -P$3 << xxx use $4 go print"**Changes to the table... (0 Replies)
Discussion started by: magikminox
0 Replies

3. Shell Programming and Scripting

Verifying killall command usage

killall -KILL rdiff-backup Is it a valid command coz i couldn't find a -KILL option for killall in the man page. (1 Reply)
Discussion started by: proactiveaditya
1 Replies

4. Shell Programming and Scripting

Suppressing the terminated message from pkill & killall commands in a bash script

Hi all, I've been pulling my hair out with this problem for 3 days:wall: now without success any help would be massively appreciated. Basically the script is used to shutdown a rails server so a new IP address can be assigned, the shutdown part is taken care of in function_one using the... (2 Replies)
Discussion started by: danmc
2 Replies

5. Shell Programming and Scripting

Script will keep checking running status of another script and also restart called script at night

I am using blow script :-- #!/bin/bash FIND=$(ps -elf | grep "snmp_trap.sh" | grep -v grep) #check snmp_trap.sh is running or not if then # echo "process found" exit 0; else echo "process not found" exec /home/Ketan_r /snmp_trap.sh 2>&1 & disown -h ... (1 Reply)
Discussion started by: ketanraut
1 Replies

6. UNIX for Dummies Questions & Answers

Calling a script from master script to get value from called script

I am trying to call a script(callingscript.sh) from a master script(masterscript.sh) to get string type value from calling script to master script. I have used scripts mentioned below. #masterscript.sh ./callingscript.sh echo $fileExist #callingscript.sh echo "The script is called"... (2 Replies)
Discussion started by: Raj Roy
2 Replies

7. Fedora

Understanding Killall command , wait option

:wall:killall -wHi i need to understand how the -w option works in terms of processes. If this command is issued does it literally terminate all running processes ..wait for them all to be terminated and then return to standard output ? Thanks in advance (2 Replies)
Discussion started by: MrRobot
2 Replies

8. Shell Programming and Scripting

Shell script works fine as a standalone script but not as part of a bigger script

Hello all, I am facing a weird issue while executing a code below - #!/bin/bash cd /wload/baot/home/baotasa0/sandboxes_finance/ext_ukba_bde/pset sh UKBA_publish.sh UKBA 28082015 3 if then echo "Param file conversion for all the areas are completed, please check in your home directory"... (2 Replies)
Discussion started by: ektubbe
2 Replies

9. Shell Programming and Scripting

How to block first bash script until second bash script script launches web server/site?

I'm new to utilities like socat and netcat and I'm not clear if they will do what I need. I have a "compileDeployStartWebServer.sh" script and a "StartBrowser.sh" script that are started by emacs/elisp at the same time in two different processes. I'm using Cygwin bash on Windows 10. My... (3 Replies)
Discussion started by: siegfried
3 Replies
KILL(1) 						     Linux Programmer's Manual							   KILL(1)

NAME
kill - terminate a process SYNOPSIS
kill [ -s signal | -p ] [ -a ] [ -- ] pid ... kill -l [ signal ] DESCRIPTION
The command kill sends the specified signal to the specified process or process group. If no signal is specified, the TERM signal is sent. The TERM signal will kill processes which do not catch this signal. For other processes, it may be necessary to use the KILL (9) signal, since this signal cannot be caught. Most modern shells have a builtin kill function, with a usage rather similar to that of the command described here. The `-a' and `-p' options, and the possibility to specify pids by command name is a local extension. OPTIONS
pid... Specify the list of processes that kill should signal. Each pid can be one of five things: n where n is larger than 0. The process with pid n will be signaled. 0 All processes in the current process group are signaled. -1 All processes with pid larger than 1 will be signaled. -n where n is larger than 1. All processes in process group n are signaled. When an argument of the form `-n' is given, and it is meant to denote a process group, either the signal must be specified first, or the argument must be preceded by a `--' option, otherwise it will be taken as the signal to send. commandname All processes invoked using that name will be signaled. -s signal Specify the signal to send. The signal may be given as a signal name or number. -l Print a list of signal names. These are found in /usr/include/linux/signal.h -a Do not restrict the commandname-to-pid conversion to processes with the same uid as the present process. -p Specify that kill should only print the process id (pid) of the named processes, and not send any signals. SEE ALSO
bash(1), tcsh(1), kill(2), sigvec(2), signal(7) AUTHOR
Taken from BSD 4.4. The ability to translate process names to process ids was added by Salvatore Valente <svalente@mit.edu>. Linux Utilities 14 October 1994 KILL(1)
All times are GMT -4. The time now is 06:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy