commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
There are 2 alternatives - vote for the best!
As an alternative to using an additional grep -v grep you can use a simple regular expression in the search pattern (first letter is something out of the single letter list ;-)) to drop the grep command itself.
Trick to avoid the form:
grep process | grep - v grep
Get the PID of a process by name
preferred way to query ps for a specific process name (not supported with all flavors of ps, but will work on just about any linux afaik)
faster ;) but your idea is really cool
If you can do better, submit your command here.
You must be signed in to comment.