From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 67604 invoked by alias); 28 Apr 2017 13:09:35 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 67585 invoked by uid 89); 28 Apr 2017 13:09:35 -0000 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 Received: from mailsrv.cs.umass.edu (HELO mailsrv.cs.umass.edu) (128.119.240.136) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 28 Apr 2017 13:09:33 +0000 Received: from [72.19.107.12] (1x-vl927-72-19-107-12.wireless.umass.edu [72.19.107.12]) by mailsrv.cs.umass.edu (Postfix) with ESMTPSA id E4540439CDA5; Fri, 28 Apr 2017 09:09:33 -0400 (EDT) Reply-To: moss@cs.umass.edu Subject: Re: find / without traversing /proc To: cygwin@cygwin.com References: <380-22017442784921354@M2W161.mail2web.com> <1188853682.20170428041153@yandex.ru> From: Eliot Moss Message-ID: <6af1dcab-6059-7719-d958-f4d52a901dde@cs.umass.edu> Date: Fri, 28 Apr 2017 18:38:00 -0000 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 X-SW-Source: 2017-04/txt/msg00360.txt.bz2 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