From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id A296A24696 for ; Sun, 21 Jan 2024 19:01:25 +0100 (CET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1705860085; b=NW+U7aFQjTM+9aLpTm8iUAxxWSDrfce6p5q8vc3d1x5qVoL6UEPR57M3E5OXmzKPcXls0GRcm7 NqAduaVVegv/Q38LPUrmvPZ62kh9/oLfE7YhZLLC3ZJABfvMb+Snc1uegCYNFEuEk503JpjRkF 1FdkMNCsF2ByF5ihmALB6FfHCrp69B7F40uWeQaU5PpqPRArjgA98r4Bpg+vA3pSor6MDuEU8n yoN+NEd9nm9iu30NVJet2i5VQOQRWLMpNvLuE0VY96nLKTV4GvAJ7zkpAu9hiMNB3gd+rt6QV0 aWz9mgcv/9EZrHIFz0hkFhovKlR9yhfdAfaDziNRIR+zjQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-lj1-f181.google.com) smtp.remote-ip=209.85.208.181; dkim=pass header.d=gmail.com header.s=20230601 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1705860085; bh=DVm8WCuuNvpyM2sQgHl+w1+44l2y1TH7grW0BNFZPdM=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=syHDwZEr0tFl/4qZlMCGSQBsa5uDkYMgg/S4WD3s7wLwL/T9mNwHYoyWFi/Pbsstb0Cek5KBpR m4OpG4G6daZOyKgn86IqBDckeSwmFAL6U5YiUQtXvPJ1aq77Nl3AMQa9CchjjRzxRgQV9OVuPO 4NLvbBN1ZIA4t/yI/nvmK3bG+1ZHsCsWHUyjVWkM6FPntSzwGSUR9x/Q2nZg4ijleKZXZEPk1l 5+vf70BqNY3oUoeK3EhznvAZoE6JsS76QrWbwJS+dF3/I714C6c3RAJsqhrQXMoNDfLzTm9EIm G6f/V3iT35Sx5gt4G7DJX9uohi1dwQpcCaY/3oxizghTZw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=TtsPa5f77aotOqpmBbtMK1WPxAP1WIDjJb7x+7htLFI=; b=NPNXPWTbjEIHP+RVvGJVEl+4J/ HOYzzQ1m6stX0MZIoLJTFi9fGXadaA3TfT8O9lcv6IdyH7rbyDB7FIMLZKLzQCEzAzA1NWRK3jnyu gy1/I4ISE6K3Yqrzpr/qBD451H3KSnJ5Wg0HodTUBr9FO6iQsVp2hfy7vcj+EMSRyIbfFs+yO1cdL aAYDT00L1Hv4/0LrMmgZgpA9QNWEdS7fUKFn/UYbBkYnkEJQLuV4q6iRQbu/VBCNxlEFyNtZ0LnQu hnUDpIMrwoZD4rser0+Oop8GE0UJ5ZoC64eAS4mKsDNoHabWYrlfLli9tZc/Qbhm7y75BO5IEuEHo CiskHkqQ==; Received: by zero.zsh.org with local id 1rRc8K-000JqY-WF; Sun, 21 Jan 2024 18:01:25 +0000 Authentication-Results: zsh.org; iprev=pass (mail-lj1-f181.google.com) smtp.remote-ip=209.85.208.181; dkim=pass header.d=gmail.com header.s=20230601 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-lj1-f181.google.com ([209.85.208.181]:49316) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1rRc7V-000J9j-IQ; Sun, 21 Jan 2024 18:00:34 +0000 Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-2cd880ceaf2so26184191fa.2 for ; Sun, 21 Jan 2024 10:00:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705860032; x=1706464832; darn=zsh.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=TtsPa5f77aotOqpmBbtMK1WPxAP1WIDjJb7x+7htLFI=; b=Jobui8wU4vCaP5U9+tQj10B+f7o0QWkXSzG/9c6+QXMZ4xSbWVcqQ+NJlqBv6H+3TT vxeygyihUEbt3LTBsLfbc2L9XtaWbRNDsg3w5qolToMeYGOQTk5bCOdmLtDnCKTDa5r6 3IVsBSgqZBoCGiardiJgsKyeX13mQ/P1XtQL44BkL/rpAFbOzvoHKOfS0hN7yDcQ9Htx gHFaLOtbvBanIL5qGw0LFjaB5UJgM/qeHdf5W0BUojS2PZ+dK0dhPPztkmBweQdhMlh2 75otC0RbjxsIhxd7uhfy5AUgBf42Mq8U3OtpnmYoHYeuB9QgfdpWMnjaE8UklHYz6Exd XfoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705860032; x=1706464832; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=TtsPa5f77aotOqpmBbtMK1WPxAP1WIDjJb7x+7htLFI=; b=P0sjT/oH4lMkgVyCsro5ONptNbZoqhx8B6WRncSQBSzQF1QgvpevApka3a9PqZYdMp fi58geOx3DRRINf7utwrkTY71RGVp+nBsb0um+CJ3EeC2K/NwaSzMGB5N3rXcKP7NjNP FKFu7RYHmAK6+otnOAgE7oM67HiLvOurs+1a7OFam2UqbfCLxcYj9QHI/Bx6VJAZFczo mXEWBHtvqdZWHaEO3hO+U6vIswhGT+jFRsHfzi5dIYwju7m+pQBqNchDSrJe84uIsPuO KWDWr6MWUUWA3yjh3sF5S+9691boFv8ikiNBaEf2av3Mon8XR/GGF9qyMn1LJvrmTHhV ETNA== X-Gm-Message-State: AOJu0YzcJm5aETMbp1MeVEicBiz2IzqVp5vFotbmxuFmYDTeM6NvgJpQ mJHAwV3J037Xs+vVIw3AQQuuSZuHsZZte3BI8HDpcxuwLEB3Q549ulwgKi/ZOdc4JfiGjZSBpjG Qit9OxrrGzZz1zQX5rE1QzPtgdBA1k85+0nU= X-Google-Smtp-Source: AGHT+IG/Fv8kCCQAptr5n/RZwlhD2mufYgqlSsBi9lB9zVusqpVkYgMZy4TJ+4O8hfO4qC+aAWrWFg6SZPwdwhEfHxQ= X-Received: by 2002:a2e:3304:0:b0:2cc:de09:ee9a with SMTP id d4-20020a2e3304000000b002ccde09ee9amr997855ljc.28.1705860031774; Sun, 21 Jan 2024 10:00:31 -0800 (PST) MIME-Version: 1.0 References: <62da1cec-bcc9-49ed-8f5f-ad428fdd3f20@eastlink.ca> In-Reply-To: <62da1cec-bcc9-49ed-8f5f-ad428fdd3f20@eastlink.ca> From: "Mark J. Reed" Date: Sun, 21 Jan 2024 13:00:19 -0500 Message-ID: Subject: Re: /proc slows % echo /**/*/etc/r*(/N) To: Zsh Users Content-Type: multipart/alternative; boundary="0000000000003b0309060f787d19" X-Seq: 29531 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: --0000000000003b0309060f787d19 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable /^proc. will match everything except /proc, so you can easily look for files like /^proc/**/whatever. But on my system which has no /proc, `**` is just as much a culprit, since that does a recursive search throughout the entire file system. For instance, /**/etc matches /`foo/bar/baz/zoo/wicky/etc` and so on... On Sun, Jan 21, 2024 at 12:20=E2=80=AFPM Ray Andrews wrote: > I used to do this kind of thing without any problems: > > % echo /**/*/etc/r*(/N) > > ... but just trying it, zsh labors for close to an hour, then spits out > countless pages of: > > /proc/9/root/etc/rc0.d /proc/9/root/etc/rc1.d /proc/9/root/etc/rc2.d > /proc/9/root/etc/rc3.d /proc/9/root/etc/rc4.d /proc/9/root/etc/rc5.d > /proc/9/root/etc/rc6.d /proc/9/root/etc/rcS.d /proc/9/root/etc/rsyslog.d > /proc/9/task/9/cwd/etc/rc0.d /proc/9/task/9/cwd/etc/rc1.d > /proc/9/task/9/cwd/etc/rc2.d /proc/9/task/9/cwd/etc/rc3.d > /proc/9/task/9/cwd/etc/rc4.d /proc/9/task/9/cwd/etc/rc5.d > /proc/9/task/9/cwd/etc/rc6.d /proc/9/task/9/cwd/etc/rcS.d > /proc/9/task/9/cwd/etc/rsyslog.d /proc/9/task/9/root/etc/rc0.d > /proc/9/task/9/root/etc/rc1.d /proc/9/task/9/root/etc/rc2.d > /proc/9/task/9/root/etc/rc3.d /proc/9/task/9/root/etc/rc4.d > /proc/9/task/9/root/etc/rc5.d /proc/9/task/9/root/etc/rc6.d > /proc/9/task/9/root/etc/rcS.d /proc/9/task/9/root/etc/rsyslog.d > > ... I'm wondering why /proc wasn't a problem previously and if there's > anything I can do to filter it out of the search -- probably all the > Linux 'system' directories too. I recall that there's some test, > something in permissions, some flag -- that identifies these > not-quite-real directories -- zsh knows who they are. They're really in > RAM, yes? I know the tilde is used to make exceptions: > > for bb in *.eml~save*; do > > ... all files matching '*.eml' excepting those that match 'save*' ... > but I can't get the syntax correct with the above. > > % echo /**/*/etc/r*~/proc*(/N) > > % echo /**/*/etc/r*(/N)~/proc* > > ... were busts. But the right answer is to filter out all those virtual > directories. Don't know why this didn't used to be a problem. But I > think I did deal with this issue a few years ago, too. > > > > > --=20 Mark J. Reed --0000000000003b0309060f787d19 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
/^proc. will match everything except /proc, so you can eas= ily look for files like /^proc/**/whatever.=C2=A0

Bu= t on my system which has no /proc, `**` is just as much a culprit, since th= at does a recursive search throughout the entire file system. For instance,= /**/etc matches /`foo/bar/baz/zoo/wicky/etc` and so on...

<= div class=3D"gmail_quote">
On Sun, Jan= 21, 2024 at 12:20=E2=80=AFPM Ray Andrews <rayandrews@eastlink.ca> wrote:
I used to do this kind of thing without = any problems:

=C2=A0=C2=A0=C2=A0=C2=A0 % echo /**/*/etc/r*(/N)

... but just trying it, zsh labors for close to an hour, then spits out countless pages of:

/proc/9/root/etc/rc0.d /proc/9/root/etc/rc1.d /proc/9/root/etc/rc2.d
/proc/9/root/etc/rc3.d /proc/9/root/etc/rc4.d /proc/9/root/etc/rc5.d
/proc/9/root/etc/rc6.d /proc/9/root/etc/rcS.d /proc/9/root/etc/rsyslog.d /proc/9/task/9/cwd/etc/rc0.d /proc/9/task/9/cwd/etc/rc1.d
/proc/9/task/9/cwd/etc/rc2.d /proc/9/task/9/cwd/etc/rc3.d
/proc/9/task/9/cwd/etc/rc4.d /proc/9/task/9/cwd/etc/rc5.d
/proc/9/task/9/cwd/etc/rc6.d /proc/9/task/9/cwd/etc/rcS.d
/proc/9/task/9/cwd/etc/rsyslog.d /proc/9/task/9/root/etc/rc0.d
/proc/9/task/9/root/etc/rc1.d /proc/9/task/9/root/etc/rc2.d
/proc/9/task/9/root/etc/rc3.d /proc/9/task/9/root/etc/rc4.d
/proc/9/task/9/root/etc/rc5.d /proc/9/task/9/root/etc/rc6.d
/proc/9/task/9/root/etc/rcS.d /proc/9/task/9/root/etc/rsyslog.d

... I'm wondering why /proc wasn't a problem previously and if ther= e's
anything I can do to filter it out of the search -- probably all the
Linux 'system' directories too.=C2=A0 I recall that there's som= e test,
something in permissions, some flag -- that identifies these
not-quite-real directories -- zsh knows who they are.=C2=A0 They're rea= lly in
RAM, yes?=C2=A0 I know the tilde is used to make exceptions:

=C2=A0=C2=A0=C2=A0=C2=A0 for bb in *.eml~save*; do

... all files matching '*.eml' excepting those that match 'save= *' ...
but I can't get the syntax correct with the above.

=C2=A0=C2=A0=C2=A0=C2=A0 % echo /**/*/etc/r*~/proc*(/N)

=C2=A0=C2=A0=C2=A0=C2=A0 % echo /**/*/etc/r*(/N)~/proc*

... were busts.=C2=A0 But the right answer is to filter out all those virtu= al
directories.=C2=A0 Don't know why this didn't used to be a problem.= =C2=A0 But I
think I did deal with this issue a few years ago, too.






--
Ma= rk J. Reed <mar= kjreed@gmail.com>
--0000000000003b0309060f787d19--