Thursday, October 24, 2013

search text in running unix process commands arguments

ps -elf | grep <process type> | pargs -aceFx $(awk -F' ' '{print $4}' - ) | grep <text to be searched>

e.g. ps -elf | grep java | pargs -aceFx $(awk -F' ' '{print $4}' - ) | grep "mahendra"

No comments:

Post a Comment