zsh-users
 help / color / mirror / code / Atom feed
From: Ray Andrews <rayandrews@eastlink.ca>
To: Zsh Users <zsh-users@zsh.org>
Subject: /proc slows % echo /**/*/etc/r*(/N)
Date: Sun, 21 Jan 2024 09:19:39 -0800	[thread overview]
Message-ID: <62da1cec-bcc9-49ed-8f5f-ad428fdd3f20@eastlink.ca> (raw)

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.





             reply	other threads:[~2024-01-21 17:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-21 17:19 Ray Andrews [this message]
2024-01-21 18:00 ` Mark J. Reed
2024-01-21 18:02   ` Mark J. Reed
2024-01-21 18:08     ` Ray Andrews
2024-01-21 20:09       ` Juergen Christoffel
2024-01-21 20:59         ` Ray Andrews
2024-01-21 19:09 ` Bart Schaefer
2024-01-21 19:58   ` Ray Andrews
2024-01-21 21:48     ` Bart Schaefer
2024-01-22  0:07       ` Ray Andrews
2024-01-22  1:02         ` Bart Schaefer
2024-01-22  1:54           ` Ray Andrews
2024-01-22  6:00   ` Mikael Magnusson
2024-01-22 15:06     ` Ray Andrews

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=62da1cec-bcc9-49ed-8f5f-ad428fdd3f20@eastlink.ca \
    --to=rayandrews@eastlink.ca \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).