Search for Unix process by command substring
12 May 2022 (Updated 12 May 2022)
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
Thanks for your comment 🙏. Once it's approved, it will appear here.
Leave a comment