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:
Especially for sysadmins when they don't want to waste time to add -p flag on the N processes of a processname.
In the old school, you did ;
and typing strace -f -p 456 -p 678 -p 974...
You can add -f argument to the function. That way, the function will deal with pgrep to match the command-line.
processname -f jrockit
There are 2 alternatives - vote for the best!
This one-liner will use strace to attach to all of the currently running apache processes output and piped from the initial "ps auxw" command into some awk.
If you can do better, submit your command here.
You must be signed in to comment.