Taming `ps` Output: Focused Process Info with `awk`
Quick Tip
Taming `ps` Output: Focused Process Info with `awk`
Challenge: The standard `ps` command often provides a wealth of information, making it difficult to quickly find specific process details like CPU usage, memory, or parent process ID (PPID).
The Solution: Leverage the power of `awk` to filter and format `ps` output, presenting only the columns you need for immediate analysis.
ps aux | awk '{print $1, $2, $3, $4, $11}'
Why it works: This command pipes the output of `ps aux` (which provides a detailed, user-oriented process listing) to `awk`. `awk` then processes each line, printing only the specified fields: User, PID, %CPU, %MEM, and Command. You can adjust the field numbers ($1, $2, etc.) to include any columns from the `ps aux` output.
Pro-Tip: To see only processes owned by a specific user, add a condition like: ps aux | awk '$1 == "yourusername" {print $1, $2, $3, $4, $11}'
Linux Tips & Tricks | © ngelinux.com | 6/17/2026
