Quick Tip
Streamline `ps` Output: Focused Process Info with `awk`
Challenge: The standard `ps` command can produce an overwhelming amount of information, making it difficult to quickly find specific process details like CPU usage, memory, or command name.
The Solution: Use `awk` to filter and format the output of `ps` to display only the columns you need.
ps aux | awk '{print $1, $2, $3, $4, $11}'
Why it works: The `ps aux` command provides a comprehensive snapshot of running processes. `awk` then processes this output line by line, printing only the specified fields (user, PID, %CPU, %MEM, and command name in this example). You can easily adjust the numbers to include different columns from `ps aux`.
Pro-Tip: To get a more human-readable output for memory and CPU, you can pipe the `awk` output to `column -t` to align the columns neatly.
Linux Tips & Tricks | © ngelinux.com | 5/21/2026
