Quick Tip
Tame Your `ps` Output: Focused Process Info with `awk`
Challenge: The default `ps aux` output can be overwhelming, filled with columns you might not need. It’s hard to quickly pinpoint specific processes or their resource usage.
The Solution: Combine `ps` with `awk` to select and reorder only the columns you care about.
ps aux | awk '{print $1, $2, $3, $4, $11}'
Why it works: `awk` processes the output line by line, and `'{print $1, $2, $3, $4, $11}’` instructs it to print only the first four columns (USER, PID, %CPU, %MEM) and the eleventh column (COMMAND) for each line. This dramatically simplifies the output, making it easier to scan for critical information.
Pro-Tip: You can customize the columns printed by `awk` to suit your specific needs. For instance, to see the full command line including arguments, you might adjust the column number for the last field.
Linux Tips & Tricks | © ngelinux.com | 6/11/2026
