Quick Tip
Taming `ps` Output: Focused Process Info with `awk`
Challenge: The output of the `ps` command can be overwhelming, especially when you need to quickly find specific processes based on partial names or user information. Scrolling through numerous columns and entries can be time-consuming.
The Solution: Combine `ps` with `awk` for targeted process information extraction.
ps aux | awk '/[p]rocess_name/ {print $1, $2, $11}'
Why it works: `ps aux` provides a comprehensive snapshot of running processes. `awk` then filters this output. The pattern `/[p]rocess_name/` is a common `awk` trick to match the literal string “process_name” without matching the `awk` command itself (which would also contain “awk”). It then prints specific fields (User, PID, Command) relevant to your search.
Pro-Tip: Use `ps -ef | grep ‘process_name’` for a simpler, though less field-specific, search if `awk` seems like overkill.
Linux Tips & Tricks | © ngelinux.com | 6/11/2026
