Re: pkill and pgrep: reality check
Emanuele Rusconi <[email protected]>
| Newsgroups | gmane.linux.lfs.general |
|---|---|
| Message-ID | <CAPife4nUrCU3X9=sjZWiZWMMYhPjw0qKN+W5mcwQFsqp8VHFAA@mail.gmail.com> |
On 9 February 2015 at 18:29, Walter Webb <[email protected]> wrote: > > While investigating some odd behavior of pkill(1), I discovered > that pkill and pgrep match any name that has the argument as a > substring. > > pgrep e > > outputs a long list of pid's. > > pgrep "" > > outputs all pid's. > > I tried pgrep on the oldest distribution I had still running, > Slackware-11.0 (according to Wikipedia, released 2006-10-02). > The result was the same. It seems too old to be a bug; but > the man page is buggy for not giving a big fat WARNING. > Or am I the only user of pkill? How is this unexpected behaviour?? It's perfectly consistent with grep's behaviour. If you read the man page, you'll find that you can use the "-x" option to exactly match the name. -- Emanuele -- http://lists.linuxfromscratch.org/listinfo/lfs-chat FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page