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

Quick Tip

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

Challenge: The default output of the `ps` command can be overwhelming, especially when you need to quickly find specific information about running processes. You often end up piping `ps` output to `grep`, which can be cumbersome.

The Solution: Combine `ps` with `awk` for highly targeted process information extraction.

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

Why it works: `awk` allows you to select and reorder specific columns from the `ps aux` output (e.g., user, PID, and command name) and then filter that refined output with `grep` for precise results.

Pro-Tip: Use `ps -eo pid,ppid,cmd,user –sort=-%cpu` to sort processes by CPU usage and display only essential columns.

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

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments