[ale] more/grep truncates piped results

Chuck Huber chuck at cehuber.org
Wed Dec 4 16:36:46 EST 2002


On Wed, Dec 04, 2002 at 03:43:21PM -0500, John Wells wrote:
> If I run ps -ef by itself, I get full command line returned.  However, if
> I pipe it through more or grep, the output is truncated and only shows
> approx. 32 characters of the command.
> 
> Is there a way to set more and grep's output width so I can modify this
> behavior?

John,

Yes.  ps truncates its display to 80 characters when writing to a non-tty.
This limitation can be overridden with the -w (wide) option to ps:

    ps -efw | more

Enjoy,
    - chuck

-- 
"The purpose of encryption is to protect good people
from bad people, not to protect bad people from the government."
     Scott McNealy, CEO Sun Microsystems
"The best way for government to control people is to remain in
   a constant threat of war." ---Karl Marx
(18 USC 242), which applies to government agents overstepping their
authority:
  "Whoever, under color of any law, statute, ordinance, regulation,
  or custom, willfully subjects any person in any State, Territory,
  or District to the deprivation of any rights, privileges, or
  immunities secured or protected by the Constitution or laws of
  the United States, . . . shall be fined under this title or
  imprisoned not more than one year, or both . . ."

 PGP signature




More information about the Ale mailing list