Contributed by jose on from the needles-and-haystacks dept.
(Comments are closed)
OpenBSD Journal
Contributed by jose on from the needles-and-haystacks dept.
(Comments are closed)
Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]
By Anonymous Coward () on
By Justin () on
I always wanted to say that. :)
I wish I didn't have to 'grep -v grep'
$ps ax |grep SOME_PROCESS |grep -v grep
I should write a psgrep shell script to do this.
#!/bin/sh
ps ax |grep $1 |grep -v grep
Comments
By Evan () farrer@cs.utah.edu on mailto:farrer@cs.utah.edu
Comments
By Justin () on
Comments
By nhoj () on
By jose () on http://monkey.org/~jose/
an alternative is to use awk:
ps -ax | awk '{if ($5 == "named") print $1}'
will also print out the PID. tweak accordingly (ie use ARGV[] in that awk one liner).
By Will Dyke () on
Comments
By Anonymous Coward () on
Just installed it and seems to be working pretty decently so far. Thanks.
By Anonymous Coward () on
alias pid='ps -awwwwx | grep -v grep | grep '
$ pid foobar
('pid' name stolen from bsdi?)
By mboxgrep () on http://mboxgrep.sf.net/