Skip to main content
14 events
when toggle format what by license comment
Oct 20 at 12:51 comment added user3132194 Had to use --ignore-ancestors (-A) parameter, cause of search string was passed to my script as a parameter and was visible in process name with -f.
S Nov 2, 2021 at 11:47 history edited AdminBee CC BY-SA 4.0
Incorporated an argument mentioned in one of the comment.
S Nov 2, 2021 at 11:47 history suggested Ombrophile CC BY-SA 4.0
Incorporated an argument mentioned in one of the comment.
Nov 2, 2021 at 11:42 review Suggested edits
S Nov 2, 2021 at 11:47
Mar 2, 2021 at 12:20 comment added anthumchris Is it possible to use pgrep to get the PID number without the full process file path?
Mar 27, 2019 at 11:44 comment added Ruslan @kojiro right or wrong, but it doesn't have the same functionality as ps. E.g. you may want ps -Aostate,cmd | grep ..., which doesn't have a direct analogue with pgrep.
Mar 6, 2018 at 1:49 comment added Pablo A @kojiro But what if I wan't to grep using more than just first 15 characters of the process name (not path nor arguments)? In that case pgrep became useless. -f use the full command line used, not just the real complete name.
Jul 30, 2017 at 8:58 comment added Beni Cherniavsky-Paskin pgrep -fl has become pgrep -fa (details: serverfault.com/a/619788/44183)
May 1, 2013 at 14:18 comment added Maja Piechotka You can always do ps $(pgrep cmd) ... if `pgrep is missing options (it won't work for empty set of commands though).
May 1, 2013 at 11:33 comment added kojiro ps | grep '[f]nord' is clever and venerable, but pgrep is right.
May 1, 2013 at 3:34 comment added phemmer There is also the -l argument to make it show the command that's being matched.
Apr 30, 2013 at 18:09 comment added michelpm @jordanm Actually, pgrep -f will look more like ps -f | grep.
Apr 30, 2013 at 14:16 comment added jordanm They will want the -f option to be more like ps | grep.
Apr 30, 2013 at 14:06 history answered BriGuy CC BY-SA 3.0