Following command outputs only first 25 characters of the process name (cmd) on the screen. How do I get it to display the full process name?
ps -eo pid,cmd,etime
Following command outputs only first 25 characters of the process name (cmd) on the screen. How do I get it to display the full process name?
ps -eo pid,cmd,etime
The simplest thing you can do is swap the order of outputs: if
cmd
is last, it will be extended to the full width of the terminal:If that's still not sufficient, you can add a
-w
(wide) output modifierAn additional
w
gives even wider output(In both of these cases, the output may be wrapped by the terminal.) If you really must have the original field order, then you can specify an explicit width for the cmd field using the syntax
field:width
e.g.This can be combined with the
-w
flag(s) if necessary e.g.The width of a particular output column can also be forced wider by using a longer header string e.g.
Pipe the output to
cat
.