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

Quick Tip

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

Challenge: The default output of the `ps` command can be overwhelming, making it difficult to quickly find specific process information like PIDs, memory usage, or command names.

The Solution: Leverage `awk` to parse and filter the `ps` output to display only the columns you need.

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

Why it works: `awk` processes the output line by line, and by specifying the desired column numbers (e.g., $1 for USER, $2 for PID, $4 for %MEM, $11 for COMMAND), you can create a concise and tailored view of your running processes.

Pro-Tip: To get a real-time view, pipe the output to `watch`: watch -n 1 'ps aux | awk '{print $1, $2, $4, $11}'

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

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments