Tame Your Processes: Focused `ps` Output with `awk`
Quick Tip
Tame Your Processes: Focused `ps` Output with `awk`
Challenge: The output of the `ps` command can be overwhelmingly verbose, making it difficult to quickly find specific process information like CPU usage, memory, or parent process ID (PPID).
The Solution: Pipe the output of `ps aux` (or `ps -ef`) to `awk` to extract only the columns you need.
ps aux | awk '{print $1, $2, $4, $11}'
Why it works: `awk` allows you to specify fields (columns) to print from its input. In this case, we’re selecting the User, PID, %CPU, and the Command itself, making the output much more digestible.
Pro-Tip: For even more control, use `ps -eo pid,ppid,%cpu,%mem,comm` to select specific output fields directly.
Linux Tips & Tricks | © ngelinux.com | 6/6/2026
