[NBLUG/talk] Finding files containing a string
Eric Eisenhart
eric at nblug.org
Mon Dec 13 10:57:02 PST 2004
On Mon, Dec 13, 2004 at 10:16:39AM -0800, Steve Johnson wrote:
> On Sun, 12 Dec 2004 20:42:39 -0800, Scott Doty <scott at sonic.net> wrote:
> > Warning: this does not work on Sun's! "killall" on Solaris kills all
> > processes except the shell invoking it -- a very dangerous command on a Sun.
>
> Also on SCO =) I found out the hardway.
pkill is available on both Linux and Solaris and can do pretty much the same
thing as Linux's "killall".
Though, it uses a regex on the name instead of an exact match, so you'll
want to use "pkill ^gaim$" instead of "killall gaim".
pkill also has the added bonus feature that you can do stuff like "pkill -u
bob" to kill all of bob's processes. (read the manpage) There's also
"pgrep", which takes the same syntax as "pkill" but just tells you pids
instead of killing things.
--
Eric Eisenhart
NBLUG Co-Founder & Director-At-Large
The North Bay Linux Users Group
http://nblug.org/
eric at nblug.org, IRC: Freiheit at freenode, AIM: falschfreiheit, ICQ: 48217244
More information about the talk
mailing list