sajad torkamani
ps -ax | grep <cmd-substring>

For example, ps -ax | grep redis will return something like:

55109 ??         0:29.64 /opt/homebrew/opt/redis/bin/redis-server 127.0.0.1:6379 

Bonus: use shell alias

function p() {
  ps -ax | grep $1
}
Tagged: Unix

Leave a comment

Your email address will not be published. Required fields are marked *