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

Quick Tip

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

Challenge: The output of the `ps` command can be overwhelmingly verbose, making it difficult to quickly find the specific process information you need. You might be looking for a particular process by its name or user, but wading through dozens of columns is inefficient.

The Solution: Use `awk` to filter and select only the essential columns from the `ps` output, creating a more readable and focused view.

ps aux | awk '{print $1, $2, $4, $11}' | grep "your_process_name"

Why it works: The `ps aux` command provides a comprehensive list of running processes. `awk` then selects specific fields (user, PID, %CPU, command name in this example) from that output, and `grep` filters for lines containing your target process name, making the output much more digestible.

Pro-Tip: To customize which columns you see, simply change the numbers within the curly braces in the `awk` command. For example, `awk ‘{print $1, $2, $11}’` would show user, PID, and command name.

Linux Tips & Tricks | © ngelinux.com | 5/18/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments