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

Quick Tip

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

Challenge: The default output of the `ps` command can be overwhelming, showing too much information when you only need specific details about running processes.

The Solution: Pipe the output of `ps` to `awk` to filter and format the process information.

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

Why it works: `ps aux` provides a comprehensive snapshot of running processes. Piping this to `awk` allows us to select and print specific columns (fields) from the output, such as the user, PID, and command name, making it much more readable.

Pro-Tip: To filter for a specific process, you can add a condition to `awk`, for example, `ps aux | awk ‘/nginx/ {print $1, $2, $11}’` to see only nginx processes.

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

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted