Bug 54195 - ps shouldn't truncate lines when outputing to a pipe
Summary: ps shouldn't truncate lines when outputing to a pipe
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: procps   
(Show other bugs)
Version: 7.1
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Aaron Brown
Depends On:
TreeView+ depends on / blocked
Reported: 2001-10-01 14:15 UTC by Need Real Name
Modified: 2007-04-18 16:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-03-29 12:45:22 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Need Real Name 2001-10-01 14:15:28 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4+) Gecko/20010921

Description of problem:
Piping ps to less or to an output file results in lines greater then 80
chars being truncated, even when running in a window with greater then 80
lines of width.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Start a maximized gnome-terminal
2.run ps e  ps outputs chars to the edge of the screen
3.run ps e > ps.out output truncated at 80 chars

Actual Results:  ps output is truncated

Expected Results:  ps should output it's full, untruncated, line of

Additional info:

Comment 1 Alexander Larsson 2002-06-20 13:46:20 UTC
This is a "historical" issue. Use the -w or w argument to make ps not cut the

Comment 2 Need Real Name 2002-06-20 13:58:38 UTC
It still doesn't seem like it does the "right" thing. When you have a terminal of 80 chars
it should truncate to 80 chars. When you pipe the output somewhere it should give the
full lines.

Comment 3 Need Real Name 2002-06-20 14:09:50 UTC
I guess the real point here is it's very strange to have an xterm with 130 columns when
you do ps aux it fills the 130 columns but when you do ps aux | less it truncates to
80 columns.

Comment 4 Alexander Larsson 2002-06-20 14:25:38 UTC
Not truncating when the output is a pipe sounds reasonable. 

Comment 5 Daniel Walsh 2004-03-26 11:41:48 UTC
Is this fixed in procps-3.1.15?

Comment 6 Daniel Walsh 2004-03-29 12:45:22 UTC
Comments from upstream maintainer:

Current behavior differs. There is no correct behavior
though; the old behavior was quite reasonable. Failing
to truncate lines makes "ps auxe | less" look ugly.
Either way, this is a losing situation. Perhaps "ps"
should link against curses so that TERM may be used.

So not a bug.

Note You need to log in before you can comment on or make changes to this bug.