www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2024/03/23/09:07:02

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 77297385842F
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1711199220;
bh=dHK/XwY7QRjYECIim0nIHXve06SAx0dGb4xzurhs/Eg=;
h=To:Cc:Subject:References:Date:In-Reply-To:List-Id:
List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
From:Reply-To:From;
b=uepsGtEykgarbi1BGRXLYnQMTHn1wQZk5fDIqeUUmBMbITTA+0qECzwIxN1NyILxe
x4DPcDk1WcEzRzSdxHKTYwTDHY5/xpAgtQTbtI7f8NqCm7mp40+5KD7mC8445nxmA1
BzvjpTCMGDdlv0LS7fqMGuydv6oadjG0GrHP+f9s=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3416E3858D28
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3416E3858D28
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
To: J M <cesarjorgemartinez AT gmail DOT com>
Cc: cygwin AT cygwin DOT com
Subject: Re: Help with use of pgrep or pkill commands with full name options
References: <CAL8MddXSDRFq4kdHRZdzsURr7eG7rS9A=XrcjxM=znALgN06_Q AT mail DOT gmail DOT com>
Date: Sat, 23 Mar 2024 13:05:58 +0000
In-Reply-To: <CAL8MddXSDRFq4kdHRZdzsURr7eG7rS9A=XrcjxM=znALgN06_Q@mail.gmail.com>
(J.
M. via Cygwin's message of "Fri\, 22 Mar 2024 16\:56\:27 +0100")
Message-ID: <f5bbk75w11l.fsf@ecclerig.inf.ed.ac.uk>
User-Agent: Gnus/5.101 (Gnus v5.10.10) XEmacs/21.5-b35 (linux)
MIME-Version: 1.0
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
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: "Henry S. Thompson via Cygwin" <cygwin AT cygwin DOT com>
Reply-To: "Henry S. Thompson" <ht AT inf DOT ed DOT ac DOT uk>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

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 AT inf DOT ed DOT ac DOT uk
                      URL: https://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019