[ubuntu-in] does anybody know what ps -ef | wc -l stand for?

Manish manishsinha.tech at gmail.com
Thu Dec 11 18:41:10 GMT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

shirish wrote:
> Hi all, does anybody what does the above command is doing?
>
> The first part of the command is about giving a list of processes
>
> ps -ef
>
> wc is about  print newline, word, and byte counts for each file
> basically tells how many words are in a document or something.
>
> so If I get
>
> $ ps -ef | wc -l 121
>
> does it mean that each processes has 121 words (or an average of
> 121 words)
>
> If yes, is that too big or small?
>
> Looking forward for answer/suggestion on the same.
Hi Shirish,

Since ps -ef lists the number of processes on the system to stdout,
using the | send its output to stdin of wc
This implies wc reads the whole text output by ps -ef, which means the
command counts the number of processes running on your system

Regards,
Manish
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEVAwUBSUFexulsMFSZ5mWPAQKzaAgAhOOkARu3UxJA5hcccwB771YITcV9Fl8r
TL7hMz0rqMl3C4t5sH4ZbhEJwlfIYFHQcRL/2om8Ab9z8W4wNsvYu6VvNozvsxOa
3+WAOBO9ZyU6faS8ayWin3q960ZUXOK/DoE0fI0oLZ7dQvc7ZwODFC/CWez9A2YS
E4qQpXyyDILtu3QnduKeF0v+1qDXvLG51LCmppVHuRufmVuoHhft3WNcOaeH1rxv
6GjdDXq+YHbgyZwfP9xMmyiPEmL/vob4G3kKCQhz776XRVfMZribKJoGx/LlJU9q
7mwwevhjbIRZCWLcBMre9ilM/rGChGXsqnYVhRnLwe+2tDQVvocAcA==
=YtoQ
-----END PGP SIGNATURE-----




More information about the ubuntu-in mailing list