The ps command has a ww
output modifier (man page says this is "wide output, unlimited length"). This modifier seems to not work if prefixed with a hyphen (-ww
) AND ps reports on a single process (with the -p
option).
For more than one process OR if a hyphen isn't used, it works.
Why so? Have I misunderstood what "wide output" means? This is on Redhat RHEL 6.5.
$ ps -w -p 2180
PID TTY TIME CMD
2180 tty1 00:00:00 mingetty
$ ps -w -p 2180 2182
PID TTY STAT TIME COMMAND
2180 tty1 Ss+ 0:00 /sbin/mingetty /dev/tty1
2182 tty2 Ss+ 0:00 /sbin/mingetty /dev/tty2
An output format specifier changes from 'CMD' to 'COMMAND', depending on whether one or more PIDs were fed to '-p'.