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

Quick Tip

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

Challenge: The output of the `ps` command can be overwhelming, listing a multitude of processes with extensive details. Often, you only need to see specific columns or filter processes based on certain criteria.

The Solution: Combine the power of `ps` with `awk` to precisely extract and format the information you need.

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

Why it works: This command pipes the full output of `ps aux` (all processes for all users, including those without a controlling terminal) to `awk`. `awk` then processes each line, printing only the first (USER), second (PID), and eleventh (COMMAND) fields, effectively creating a concise process listing.

Pro-Tip: To see processes owned by a specific user, you can add a condition to awk: ps aux | awk '$1 == "your_username" {print $1, $2, $11}'

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

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted