Quick Tip
Taming `ps` Output: Focused Process Info with `awk`
Challenge: The default output of the `ps` command can be overwhelmingly verbose, making it difficult to quickly find the specific process information you need.
The Solution: Leverage `awk` to filter and format the `ps` output for pinpoint accuracy.
ps aux | awk '{print $1, $2, $11}'
Why it works: This command pipes the output of `ps aux` (which provides a comprehensive snapshot of running processes) to `awk`. `awk` then processes each line, printing only the first column (USER), second column (PID), and eleventh column (COMMAND), effectively cleaning up the output to show just the essential details.
Pro-Tip: To sort the output by memory usage (descending), you can add `sort -rnk 4` after the `ps aux` command and before piping to `awk`. Example: ps aux | sort -rnk 4 | awk '{print $1, $2, $4, $11}' (Note: this adds the %MEM column to your output).
Linux Tips & Tricks | © ngelinux.com | 5/20/2026
