The [ ] are special in shell and need to be escaped.
Say you have a file program in your current directory, then the shell replaces [p]rogram by the matching program, and the grep can find its own arguments in the ps args.
Safe is grep "[p]rogram". (It's a good habit to always put the grep argument in quotes!)
Another problem is that xargs runs the kill without arguments if nothing matches.
Suggestion
Letting awk do the grep is not only more efficient, it also provides means to further add conditions for certain columns.
Last edited by MadeInGermany; 10-21-2017 at 05:21 AM..
Hello,
First let me start by saying I have searched the forum and read all the SUID stuff but it is not in the neighborhood I am looking for.
Here is the problem. We want to grant a non super-user permission to kill root processes but only if the process matches certain criteria. ... (8 Replies)
hi,
I have a SCO unix server which has a 36gb hard drive, but the IT company who supplied it assigned 1gb to /dev/root, 15mb to /dev/boot and 33gb to /dev/u.
The /dev/root partition is now full, is there a way I can use the 33gb assigned to /dev/u without loosing any data, preferably... (2 Replies)
i have a very short file that has in it a line for a find command.
now, when i run this script and I kill the script later, using the ps -ef | grep scriptname. i noticed kill -9 kills the script itself but does not kill the internal find command that it gave birth to.
say theres a file... (0 Replies)
Hello,
ps -C a*
returns the list of the process I need to kill.
but
ps -C a* -o pid | kill
does not work and I can't get the syntax right.
Thanks for any help (4 Replies)
how to kill the processes of aperticular user?
because i have nearly 25000 process are there for perticular user. i need to kill.
Please provide the information?
Regards,
Rajesh (3 Replies)
Hi,
How to kill the processes running under ptree ?
I am noticing lot of processes running under ptree with ssh ? I tried to kill with -9 option which is not working ?
Thanks,
Radhika. (2 Replies)
for i in 'ps -f | grep textedit'
do
kill $i
done
I wrote this but it wont work.
I am trying to find processes and kill them.
Any help would be welcome. (1 Reply)
Hi there, i've been searching all over and i thought i had understood the way i should go to kill all the processes related to a user. But i'm getting more confused then i was.
By lunch time i have to make a database backup, and for that all the users shoul logout. The problem is that many users... (4 Replies)
Want to kill multiple processes by name. for the example below, I want to kill all 'proxy-stagerd_copy' processes.
I tried this but didn't work:
>> ps -ef|grep proxy_copy
root 991 986 0 14:45:34 ? 0:04 proxy-stagerd
root 1003 991 0 14:45:49 ? 0:01... (2 Replies)
Is there a way to find out the total no of processes that were running ?
- 2 or 3 hours before
- list those no of processes (3 Replies)
Discussion started by: jansat
3 Replies
LEARN ABOUT CENTOS
vboxbeep
vboxbeep(1) Linux System Administration vboxbeep(1)NAME
vboxbeep - isdn voice box (beeper)
SYNOPSIS
vboxbeep [OPTION] [OPTION] [...]
DESCRIPTION
vboxbeep is a daemon, that watches several message directories. If new messages are found it will beep. Vboxbeep does not use vboxd, it can
only watch local directories.
Vboxbeep is also used to stop this annoying beep.
OPTIONS
Without any options, vboxbeep will signal an already running vboxbeep to stop its beep. Only root can start it as daemon.
-s, --sound HOURS
Hours to play beep signal. Use 24 hour format, like 0-23. Multiple hours can be given separated by commas, a "*" is used for always,
"-" for never.
-m, --messagebox DIR
Message directory to scan. You can use this option several times.
-p, --pause SECS
Time to wait between every check. Default is 5 seconds.
-k, --kill
Kill a running vboxbeep. This option can only be used by root.
-h, --help
Show summary of options.
-v, --version
Show version of program.
NOTE
vboxbeep will only work if it is installed suid root. This may be a security hole, so many distributions do not install it suid root, and
thus it's useless. If you want to enable vboxbeep, please read the distribution-specific documentation how to do that (e.g. with debian
gnu/linux read /usr/doc/isdnutils/README.debian).
AUTHOR
This manual page was written by Andreas Jellinghaus <aj@dungeon.inka.de>, for Debian GNU/Linux and isdn4linux.
ISDN 4 Linux 3.13 2000/09/15 vboxbeep(1)