Taming Process Sprawl: Focused `ps` Output with `awk`

Quick Tip

Taming Process Sprawl: Focused `ps` Output with `awk`

Challenge: The default `ps` command often outputs a lot of information, making it difficult to quickly find specific process details like PID, CPU usage, or command name when you have many running processes.

The Solution: Use `awk` to filter and format the output of `ps` for precisely the information you need.

ps aux | awk '{print $1, $2, $3, $11}'

Why it works: This command pipes the full `ps aux` output to `awk`. `awk` then selects and prints specific columns (user, PID, %CPU, and command) based on their positional index, giving you a cleaner, more focused view of your running processes.

Pro-Tip: For even more specific filtering, you can add conditions within `awk`. For example, to see only processes using more than 5% CPU: ps aux | awk '$3 > 5.0 {print $1, $2, $3, $11}'

Linux Tips & Tricks | © ngelinux.com | 6/27/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted