From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by sourceware.org (Postfix) with ESMTPS id E20C03858D28 for ; Fri, 22 Mar 2024 16:22:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E20C03858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=SystematicSW.ab.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=SystematicSW.ab.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E20C03858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=216.40.44.13 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711124583; cv=none; b=IDCamQVr2Ve9d4Rezril1VJ9kCi2ZvRvD6nIS9pMSfrxXUCYpl0hVzBDSCkx90kThuSjyBIFx0KgW+FTss6nxJSAQPetKzlCILelt9xv7CbV3NTBLGhr02aT29FrbuaLgZze6p+Tl9ogHr3e+9HqSxD4qSuqWMSpBlgvxxZcMek= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711124583; c=relaxed/simple; bh=T+/PArGnT5mQ+td+HoKdCaoPU7rM2aL18zQfzp7fgpM=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=RJRVKepHNdLQ4TYoiNiQOwmYv8erCMvgFmlvnXFJHB9L9pIEF60nL0i4ZP8nqW55eh9yAqm5mHzu2Qn1wTKcnNRseqk5cK4l5YUkF/YXxf5uh0y6jGAMKrOUQttgZxaljxggpVChK8SRZ6LdPGn2H1MMESJYX76leMCkNcfm8tY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from omf03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 7978B806E4 for ; Fri, 22 Mar 2024 16:22:52 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: Brian.Inglis@SystematicSW.ab.ca) by omf03.hostedemail.com (Postfix) with ESMTPA id 1422D6000F for ; Fri, 22 Mar 2024 16:22:50 +0000 (UTC) Message-ID: <8962129f-3314-4970-be29-e5bb4416749c@SystematicSW.ab.ca> Date: Fri, 22 Mar 2024 10:22:50 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Reply-To: cygwin@cygwin.com Subject: Re: Help with use of pgrep or pkill commands with full name options Content-Language: en-CA To: cygwin@cygwin.com References: From: Brian Inglis Organization: Systematic Software In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1422D6000F X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Stat-Signature: oks4eo88q8ff4os5oiozu9cht71sph15 X-Rspamd-Server: rspamout04 X-Session-Marker: 427269616E2E496E676C69734053797374656D6174696353572E61622E6361 X-Session-ID: U2FsdGVkX1+FSyENwhduA27ZeAlPFa9/niINOpQM8sw= X-HE-Tag: 1711124570-821570 X-HE-Meta: U2FsdGVkX187yX2UugWXM+pu63d4dqvJGvaI3CKYUUvePQ2nANeLM6548M+enrDlA2OiNrWeUrtEhq/KgnhuAn9crmcK+0fucovWlm0+8k3VHUxruMRSWj0DeppK41uh5neyWMbhyPyx6H3q663DyH4r7Dw6NQJz7ZaAndddi9HgUkBFHckmns/O0wB1N783DaPEUPff8v23iI8S8txEYcQ1LYyYOJKFlYJW4lOP+gScW493tDKKhCe55b2Me2IKEh278bN1cwSuXyDAaA/bby6ylJo8ia4cv6Vxr82wp/ToXLOo5NAxR3l+ud46MJhGoj2pcTTC8LsDcr4VikiP0EAvNnuozI1i X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2024-03-22 09:56, J M via Cygwin wrote: > Help with use of pgrep or pkill commands with full name options. > > I trying to use pgrep or pkill utility commands to find processes but using > the full path names, by example, find /usr/bin/bash (package procps-ng): > > Then, if I use pgrep -f /usr/bin/bash, don't find nothing. > > Using pkill -f /usr/bin/bash don't get the task. > > If I use pidof /usr/bin/bash, this works. > > How do I get it to do use pgrep, pkill, etc? Look at the proc names using `procps -ae` - if it does not show a path, do not use `-f, --fullname /path/name`, just use `name`, and you may have to experiment if you want to use `-x, --exact`, and possibly other options. -- Take care. Thanks, Brian Inglis Calgary, Alberta, Canada La perfection est atteinte Perfection is achieved non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut -- Antoine de Saint-Exupéry