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

Quick Tip

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

Challenge: The output of the `ps aux` command can be overwhelming, making it difficult to quickly find specific information about running processes, such as CPU or memory usage for a particular application.

The Solution: Leverage `awk` to parse and filter the `ps` output for targeted information.

ps aux | awk 'NR==1 || /your_process_name/ { print $0 }'

Why it works: `awk ‘NR==1’` prints the header line, and `’ /your_process_name/’` filters for lines containing your specific process name. This allows you to see only the relevant process information.

Pro-Tip: Use `ps aux | awk ‘{print $1, $2, $11}’` to display only the User, PID, and Command columns for all processes.

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

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted