Skip to main content
6 events
when toggle format what by license comment
Aug 16, 2021 at 15:41 comment added p e p I like this answer best because people reading this don't have to wonder why in the world the grep requires brackets in the other case, it's not obvious at all unless you know why it's needed. This one is really clear. But both are great answers!
Oct 11, 2019 at 8:04 comment added Murphy Improved variation.
Jul 26, 2018 at 7:22 comment added Davos as per superuser.com/a/409658/450260 you should be excluding the full grep fnord not just grep i.e. $ ps aux | grep fnord | grep -v "grep fnord"
Mar 28, 2018 at 11:20 comment added samaspin I prefer this as its more explicit about its intention than the accepted answer and works in all but one case.
Oct 31, 2017 at 23:33 comment added Nabi K.A.Z. It's bad answer! Because if there was a word grep in your phrase. It will not show that process. For example, suppose a file called foo_grep_bar.txt is being edited by the nano command. So there's a process running: root 14908 0.0 0.0 110012 1692 pts / 3 S + Oct31 0:00 nano foo_grep_bar.txt According to this answer, this will not work: $ ps aux | grep nano | grep -v grep Because there's a grep word in your filename.
Apr 30, 2013 at 14:05 history answered Brandon Kreisel CC BY-SA 3.0