[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] more/grep truncates piped results
- Subject: [ale] more/grep truncates piped results
- From: nojunkmail at cehuber.org (Chuck Huber)
- Date: Wed, 4 Dec 2002 16:22:48 -0500
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