Re: find / without traversing /proc
- Date: Fri, 28 Apr 2017 09:09:30 -0400
- From: Eliot Moss <moss@xxxxxxxxxxxx>
- Subject: Re: find / without traversing /proc
On 4/27/2017 9:11 PM, Andrey Repin wrote:
Greetings, Václav Haisman!
On 27 April 2017 at 10:49, wrote:
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
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?
The -o options are high level "or" choices. Other flags like -type generally
have "and" semantics, and "and" binds more tightly than "or". The conclusion
is" put these after your last -o, the filter after the pruning.
Regards - Eliot Moss
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple