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

Quick Tip

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

Challenge: The default output of the `ps` command can be overwhelming, displaying a lot of information that you might not need. It’s often difficult to quickly find specific process details like CPU or memory usage for a particular user or command.

The Solution: You can leverage the power of `awk` to filter and format the output of `ps` to display only the columns you care about.

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

Why it works: This command pipes the output of `ps aux` (which shows all processes for all users with detailed information) to `awk`. `awk` then prints only the specified columns: User (1), PID (2), %CPU (3), %MEM (4), and Command (11). This dramatically simplifies the output, making it easier to scan for what you need.

Pro-Tip: To quickly find processes by a specific user, you can add a condition to your `awk` command: ps aux | awk '$1 == "yourusername" {print $1, $2, $3, $4, $11}'

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

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments