“ps -ew” won’t show wide output

ps

It only shows the first 15 characters from /proc/pid/stat. But "ps -w pid" shows wide output. Why? Is this a bug? Thanks.

Best Answer

I don't think "wide output" means what you want. I created a script named foo_foo_foo_foo_foo_foo_foo_foo_foo_foo_foo_foo_foo_foo.sh and get the following

$ ps -w
27848 pts/3    00:00:00 foo_foo_foo_foo

$ ps a
27848 pts/3    S      0:00 /bin/bash ./foo_foo_foo_foo_foo_foo_foo_foo_foo_foo_foo_foo_foo_foo.sh

$ ps -f
username 28049 26422  0 09:48 pts/3    00:00:00 /bin/bash ./foo_foo_foo_foo_foo_foo_foo_foo_foo_foo_foo_foo_foo_foo.sh

The only thing w and -w seem to do is let lines wrap if I shrink the window so it won't fit on a line:

$ ps w
28429 pts/3    S      0:00 /bin/bash ./foo_foo_foo_foo_foo_foo_foo_foo_foo_foo_foo_fo
o_foo_foo.sh
Related Topic