Taming `ps` Output: Focused Process Info with `awk`
Quick Tip
Taming `ps` Output: Focused Process Info with `awk`
Challenge: The `ps` command can produce a lot of information, making it difficult to quickly find specific process details like CPU usage, memory consumption, or the command line arguments.
The Solution: Combine `ps` with `awk` to filter and format the output, displaying only the columns you need.
ps aux | awk '{print $1, $4, $11}'
Why it works: `ps aux` lists all processes with detailed information. `awk ‘{print $1, $4, $11}’` then processes this output line by line, printing only the 1st (username), 4th (CPU%), and 11th (command) columns.
Pro-Tip: You can also use `ps -eo pid,ppid,cmd,%cpu,%mem` to get a more structured output and then pipe that to `awk` for even more precise filtering.
Linux Tips & Tricks | © ngelinux.com | 6/4/2026
