public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* find / without traversing /proc
@ 2017-04-27 16:31 bonhard
  2017-04-27 17:16 ` Václav Haisman
  2017-04-28 10:05 ` Gary Johnson
  0 siblings, 2 replies; 12+ messages in thread
From: bonhard @ 2017-04-27 16:31 UTC (permalink / raw)
  To: cygwin; +Cc: fergus

The command "find /" takes forever, if it completes at all, because of the
need to traverse the induced directory /proc. Is this directory often
needed by users? Can it be skipped by setting up "export CYGWIN=something",
or even by default, with the requirement on the user to induce it if needed?
There seems to be no switch to the command find that would easily allow
"but not this subdirectory": if there was, I wouldn't be asking. Quite a
lot of surfing led me to
$ find / \( -wholename /proc -o -wholename /dev \) -prune -o -print
which is really heavyweight syntax for a simple requirement. I am pretty
certain it leads to the behaviour required "do not traverse" though various
posters seem to think it just leads to "traverse but do not report" saving
almost nothing.
Assuming the syntax is correct, I have not been able to incorporate any
qualifiers such as -type d or -type f or -type l. Any ideas where to slot
these so that they work?


--------------------------------------------------------------------
mail2web - Check your email from the web at
https://link.mail2web.com/mail2web



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

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: find / without traversing /proc
@ 2017-04-28 13:09 Ugly Leper
  0 siblings, 0 replies; 12+ messages in thread
From: Ugly Leper @ 2017-04-28 13:09 UTC (permalink / raw)
  To: cygwin

The directory /proc is a bit special. More generally:
What about "find /d0 without traversing /d0/d1 or /d0/d2"?
The syntax
$ find /d0 \( -wholename /d0/d1 -o -wholename /d0/d2 \) -prune -o -print
works but is tortured; and can qualifiers e.g. -type f  or -type d be
incorporated?

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-04-29  7:18 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-27 16:31 find / without traversing /proc bonhard
2017-04-27 17:16 ` Václav Haisman
2017-04-27 19:15   ` Andrew Schulman
2017-04-28 17:19   ` Andrey Repin
2017-04-28 18:38     ` Eliot Moss
2017-04-29  0:35     ` Eric Blake
2017-04-29 15:11       ` Andrey Repin
2017-04-30 21:37         ` Greywolf
2017-04-30 23:19           ` Greywolf
2017-04-28 10:05 ` Gary Johnson
2017-04-28 14:07   ` Brian Inglis
2017-04-28 13:09 Ugly Leper

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 read-only IMAP folder(s) and NNTP newsgroup(s).