From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from loire.is.ed.ac.uk (loire.is.ed.ac.uk [129.215.16.10]) by sourceware.org (Postfix) with ESMTPS id 3416E3858D28 for ; Sat, 23 Mar 2024 13:06:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3416E3858D28 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=inf.ed.ac.uk Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=inf.ed.ac.uk ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3416E3858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=129.215.16.10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711199174; cv=none; b=s9YbeOfdMQ/0kXYbgYedGrZv20mO8PS3lVoHpAOCjgPW7OX005BbCoJ+rU8HtzRkor+sBOVfMI8X4Q3hivc8sYV+E7CLVdtfOBoh6P7IMAeJprJPPV5wicdd9V552H1+vCUQ+QTn0hHLwRbfd3WwPm/phOvBBjhNiEoKVxm/aQ0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711199174; c=relaxed/simple; bh=wevtJkt8EWnTKGgIFqgFn1tC9FxEpV9izYWvbHfn4cU=; h=To:Subject:From:Date:Message-ID:MIME-Version; b=JJ4V3rDmIgVGpSoo/EkY6xc8OoEYZuztyyKVf0Y9OwrSPGfR1IonKSdfyWf9fAboJKVW2V0OsSI0B0EXuDDfSTy4v10z7xPLD+zJE236/fFPg4HS95Y1upbsrLz77BaPI75y3Vv3oWTPtSEE5e7KKRUlzu/GvoVVqgWqjD8GqS4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from flakey.inf.ed.ac.uk (flakey.inf.ed.ac.uk [129.215.202.88]) by loire.is.ed.ac.uk (8.14.7/8.14.7) with ESMTP id 42ND5xjv001472 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 23 Mar 2024 13:05:59 GMT Received: from ecclerig.inf.ed.ac.uk (ecclerig.inf.ed.ac.uk [129.215.24.151]) by flakey.inf.ed.ac.uk (8.14.7/8.14.7) with ESMTP id 42ND5vQ4025080; Sat, 23 Mar 2024 13:05:58 GMT Received: by ecclerig.inf.ed.ac.uk (Postfix, from userid 27024) id 0EBEA1200B5; Sat, 23 Mar 2024 13:05:59 +0000 (GMT) To: J M Cc: cygwin@cygwin.com Subject: Re: Help with use of pgrep or pkill commands with full name options References: From: "Henry S. Thompson" Date: Sat, 23 Mar 2024 13:05:58 +0000 In-Reply-To: (J. M. via Cygwin's message of "Fri\, 22 Mar 2024 16\:56\:27 +0100") Message-ID: User-Agent: Gnus/5.101 (Gnus v5.10.10) XEmacs/21.5-b35 (linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Edinburgh-Scanned: at loire.is.ed.ac.uk X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: J M via Cygwin writes: > 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. I note that on Cygwin: pgrep -f /bin/bash finds some but not all of my running bash processes. pgrep -a bash finds all of them. I leave it to others to explain why /usr/bin/bash doesn't work. I note that on (Debian) Linux the results of the above alternatives _also_ differ, but that pgrep -f /usr/bin/bash and pgrep -f /bin/bash both work and give the same results. ht -- Henry S. Thompson, School of Informatics, University of Edinburgh 10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND e-mail: ht@inf.ed.ac.uk URL: https://www.ltg.ed.ac.uk/~ht/ [mail from me _always_ has a .sig like this -- mail without it is forged spam]