This is the mail archive of the
mailing list for the Cygwin project.
Re: find / without traversing /proc
- From: Andrey Repin <anrdaemon at yandex dot ru>
- To: Václav Haisman <vhaisman at gmail dot com>, cygwin at cygwin dot com
- Date: Fri, 28 Apr 2017 04:11:53 +0300
- Subject: Re: find / without traversing /proc
- Authentication-results: sourceware.org; auth=none
- Authentication-results: smtp3m.mail.yandex.net; dkim=pass firstname.lastname@example.org
- References: <380-22017442784921354@M2W161.mail2web.com> <CAKw7uVix05wZvX=in08fjvNWwZb_DUYmYbeTn5XXOBdedNd5DQ@mail.gmail.com>
- Reply-to: cygwin at cygwin dot com
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
>> 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?
> Doesn't the -xdev switch help with this?
Just keep in mind that -xdev is an extension and different platform may use a
different way to indicate that find should stick to the current device.
With best regards,
Friday, April 28, 2017 04:10:57
Sorry for my terrible english...