Answers to: How do I hide this stuff in ps?http://linuxexchange.org/questions/2744/how-do-i-hide-this-stuff-in-ps<pre><code>joehillen@production:~$ ps -ef UID PID PPID C STIME TTY TIME CMD root 1 0 0 Sep02 ? 00:01:34 init [2] root 2 0 0 Sep02 ? 00:00:00 [kthreadd] root 3 2 0 Sep02 ? 00:00:01 [ksoftirqd/0] root 4 2 0 Sep02 ? 00:00:00 [migration/0] root 5 2 0 Sep02 ? 00:00:00 [migration/1] root 6 2 0 Sep02 ? 00:00:00 [ksoftirqd/1] root 7 2 0 Sep02 ? 00:00:01 [migration/2] root 8 2 0 Sep02 ? 00:00:02 [ksoftirqd/2] root 9 2 0 Sep02 ? 00:00:01 [migration/3] root 10 2 0 Sep02 ? 00:00:00 [ksoftirqd/3] root 11 2 0 Sep02 ? 00:03:55 [events/0] root 12 2 0 Sep02 ? 00:03:16 [events/1] root 13 2 0 Sep02 ? 00:02:51 [events/2] root 14 2 0 Sep02 ? 00:06:00 [events/3] root 15 2 0 Sep02 ? 00:00:00 [cpuset] root 16 2 0 Sep02 ? 00:00:00 [khelper] root 19 2 0 Sep02 ? 00:00:00 [netns] root 20 2 0 Sep02 ? 00:00:00 [async/mgr] root 23 2 0 Sep02 ? 00:00:00 [xenwatch] root 24 2 0 Sep02 ? 00:00:00 [xenbus] root 56 2 0 Sep02 ? 00:00:24 [sync_supers] root 58 2 0 Sep02 ? 00:00:26 [bdi-default] root 60 2 0 Sep02 ? 00:00:00 [kblockd/0] root 61 2 0 Sep02 ? 00:00:01 [kblockd/1] root 62 2 0 Sep02 ? 00:00:00 [kblockd/2] root 63 2 0 Sep02 ? 00:00:00 [kblockd/3] root 68 2 0 Sep02 ? 00:00:00 [kseriod] root 117 2 0 Sep02 ? 00:00:11 [kswapd0] root 118 2 0 Sep02 ? 00:00:00 [aio/0] root 119 2 0 Sep02 ? 00:00:00 [aio/1] root 120 2 0 Sep02 ? 00:00:00 [aio/2] root 121 2 0 Sep02 ? 00:00:00 [aio/3] root 122 2 0 Sep02 ? 00:00:00 [crypto/0] root 123 2 0 Sep02 ? 00:00:00 [crypto/1] root 124 2 0 Sep02 ? 00:00:00 [crypto/2] root 125 2 0 Sep02 ? 00:00:00 [crypto/3] root 136 2 0 Sep02 ? 00:00:00 [khvcd] root 290 2 0 Sep02 ? 00:00:00 [kstriped] root 294 2 0 Sep02 ? 00:00:00 [ksnapd] </code></pre> <p>I'm guessing these are kernel modules. They are never really relevant to my interests.</p>enThu, 01 Dec 2011 09:50:17 -0500Comment by mod on mod's answerhttp://linuxexchange.org/questions/2744/how-do-i-hide-this-stuff-in-ps#2754<p>I prefer that "ps -fN --ppid 2 -C init,kthreadd" approach to the grep-based one I suggested. Nice.</p>modThu, 01 Dec 2011 09:50:17 -0500http://linuxexchange.org/questions/2744/how-do-i-hide-this-stuff-in-ps#2754Answer by Joehillenhttp://linuxexchange.org/questions/2744/how-do-i-hide-this-stuff-in-ps/2753<p>I had submitted this question to reddit, and <a href="http://www.reddit.com/r/linuxquestions/comments/mgc0f/how_do_i_hide_this_stuff_in_ps/c30pfw8">this is the answer I got</a>. </p> <p>This is what I ended up adding to my <code>ps</code> alias:</p> <pre><code>ps -fN --ppid 2 </code></pre>JoehillenTue, 29 Nov 2011 18:02:48 -0500http://linuxexchange.org/questions/2744/how-do-i-hide-this-stuff-in-ps/2753Answer by modhttp://linuxexchange.org/questions/2744/how-do-i-hide-this-stuff-in-ps/2746<p>It's not clear from your rather terse question what you <em>are</em> interested in seeing, so we're sorta flying blind here... but to narrowly answer your specific question using your specific example, you could pipe the output of your ps command through grep, thus:</p> <p>ps -ef | grep -v -e '^root .*[[:digit:]] \['</p> <p>...to weed out the lines you mentioned, though that could also remove any "normal" lines that happened to match that expression.</p>modFri, 18 Nov 2011 21:14:41 -0500http://linuxexchange.org/questions/2744/how-do-i-hide-this-stuff-in-ps/2746Answer by Alan Rochesterhttp://linuxexchange.org/questions/2744/how-do-i-hide-this-stuff-in-ps/2745<p>It isn't "kernel modules". You've called up : report <strong>p</strong>rocess <strong>s</strong>tatus</p> <p>It's a list of things which are running.</p> <p>What do you mean hide? Why do you want to hide it?</p> <p>See <a href="http://linux.about.com/od/commands/l/blcmdl1_ps.htm">http://linux.about.com/od/commands/l/blcmdl1_ps.htm</a></p>Alan RochesterFri, 18 Nov 2011 11:33:54 -0500http://linuxexchange.org/questions/2744/how-do-i-hide-this-stuff-in-ps/2745