DEV Community

ps aux output in cronjobs

Alexandru Bucur on September 22, 2018

Hello there, Going trough an ad-hoc cronjob for checking an existing process I've hit a weird case that the command itself was working well when r...
Collapse
 
tadman profile image
Scott Tadman

The little known -o option also allows you to customize the output columns to fit your needs better.

man7.org/linux/man-pages/man1/ps.1...

Collapse
 
ferricoxide profile image
Thomas H Jones II

Dammit: beat me to it.

A lot of commands have output-formatter options. Life-savers when you don't want to have to write complex output-filters or when you want more-predictable or useful output.

And, where commands don't have output-formatters, they often have analogous tools that provide similar output-types but in more-useful (for the use-case) outputs.