X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=SpA5+C6Daf/CXYCX SGBj6XRbBafNAMK2b4djhu0LW8pfBR1J01R2AQBqh4/0Xcjm+FUjMU7BXas1+qH3 qVojy+cxXG/l9TYC0RRWQaRwxSnMJSrU93THLf7Vo/57CFk5LTzwnzI49jWQdGQr mbKCaVasEh9xj/XHTgLCrc52NIc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=g8tZ2yQB8cCpUvsVMn81FW Ab9/8=; b=TAFj+y6A54OgGYJ6jPcV/aOMu7b5+6khgZ8lwZEFWZeB4nqyTc7TqR 9v+Fh9gzeWVuv+G+NpqtJBlrxeffGuv7lQk71VbLwuJ1XrpxtEr0GeMQKbqrOo1W AN2Bqqryjz39DmVMPadsuvXwpL9fjkltY4doMEEK6Vj/nmVNOMyHg= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: =?ISO-8859-1?Q?No, score=1.0 required=5.0 tests=BAYES_20,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=Greetings, V=c3=a1clav, Vclav, H*Ad:D*cs.umass.edu?= X-HELO: mailsrv.cs.umass.edu Reply-To: moss AT cs DOT umass DOT edu Subject: Re: find / without traversing /proc To: cygwin AT cygwin DOT com References: <380-22017442784921354 AT M2W161 DOT mail2web DOT com> <1188853682 DOT 20170428041153 AT yandex DOT ru> From: Eliot Moss Message-ID: <6af1dcab-6059-7719-d958-f4d52a901dde@cs.umass.edu> Date: Fri, 28 Apr 2017 09:09:30 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 MIME-Version: 1.0 In-Reply-To: <1188853682.20170428041153@yandex.ru> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes 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 >>> 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? 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 FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple