Go back to the main page

Show the entire line within the ps command

This article is over 2 years old. Proceed with caution.

Regards ♨ – Minimul

 

Problem:

One thing that always drove me crazy was not being able to get the full listing from the ps command. For example when doing ps -elf it will cut off the command column. Even dumping it to file is no help, as the command column will get cut off if it goes beyond the 80 char width.

Solution:

Use the width switch:

ps -elf --width 500 | grep java.*encode

-o switch is handy too

ps -u apache --width 1000 -o "%p|%a" | grep java.*# the -u switch only shows processes with the user of apache

Comment on this article?