News for hackers. Stuff that matters.
Re:A Unix Utility to Know About: lsof (2009) by smhenderson on Friday August 26, 2016 @12:37PM (#12367401)
Yeah, I always felt having to type the extra bit was strange, like maybe grep could have a switch to say "don't find grep" but I guess having a switch for such a specific use case, grepping processes, is overkill.

Anyway, it's just a reflex now to always:

  ps aux | grep <program> | grep -v grep
Re:A Unix Utility to Know About: lsof (2009) by amyjess on Friday August 26, 2016 @02:21PM (#12368194)
You can also surround each character in the program's name with square brackets.

    ps -ef | grep [p][r][o][g][r][a][m]
Re:A Unix Utility to Know About: lsof (2009) by smhenderson on Monday August 29, 2016 @12:11PM (#12382872)
Yes, I never knew that. But I saw it in another post and as the sibling post mentions it's enough to surround just the first character with the brackets...

This is why I love HN, I learn stuff I never knew I wanted to know!

Re:A Unix Utility to Know About: lsof (2009) by jpitz on Friday August 26, 2016 @02:51PM (#12368418)
You only need surround one character.