I use pgrep from procps-3.3.10.
If I have executable
returns nothing, while
ps aux | grep aout_abcdefgh_ver27 returns the expected result:
ps aux | grep aout_abcdefgh_ver27 evgeniy 14806 0.0 0.0 4016 672 pts/8 S 12:50 0:00 ./aout_abcdefgh_ver27 evgeniy 15241 0.0 0.0 12596 2264 pts/8 S+ 12:50 0:00 grep --colour=auto aout_abcdefgh_ver27
But if I run
$ pgrep aout_abcdefgh_v 14806
pgrep returns what I expect, so I wonder why it works in such a strange way, maybe I should use some option for
pgrep to work
with full process name?
It looks like it has a very short limit for the pattern, something like ~ 10 symbols.