Quick Tip
Master `ps` Output: Focused Process Info with `awk`
Challenge: The default `ps` command output can be overwhelming, showing far more information than you might need. This makes it difficult to quickly pinpoint specific process details like CPU usage, memory consumption, or command name.
The Solution: Pipe the output of `ps` to `awk` to selectively display desired columns.
ps aux | awk '{print $1, $2, $4, $11}'
Why it works: `awk` is a powerful text-processing tool that can split lines into fields. By specifying the desired column numbers (e.g., `$1` for USER, `$2` for PID, `$4` for %CPU, `$11` for COMMAND), you can tailor the output to your exact needs.
Pro-Tip: For a more interactive way to filter and search running processes, consider using `htop` or `top` which provide real-time, color-coded information.
Linux Tips & Tricks | © ngelinux.com | 5/25/2026
