From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 48928 invoked by alias); 14 Dec 2016 17:35:32 -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 48916 invoked by uid 89); 14 Dec 2016 17:35:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.0 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=kenneth, Kenneth, wan, H*MI:sk:87h967o X-HELO: forward3p.cmail.yandex.net Received: from forward3p.cmail.yandex.net (HELO forward3p.cmail.yandex.net) (77.88.31.18) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 14 Dec 2016 17:35:21 +0000 Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [77.88.29.84]) by forward3p.cmail.yandex.net (Yandex) with ESMTP id B069F20E50; Wed, 14 Dec 2016 20:35:18 +0300 (MSK) Received: from smtp1p.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp1p.mail.yandex.net (Yandex) with ESMTP id F40BE17806E9; Wed, 14 Dec 2016 20:35:17 +0300 (MSK) Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 40kmVBpknY-ZH8e8hgv; Wed, 14 Dec 2016 20:35:17 +0300 (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client certificate not present) Authentication-Results: smtp1p.mail.yandex.net; dkim=pass header.i=@yandex.ru X-Yandex-Suid-Status: 1 0,1 0 Received: from [192.168.1.10] (HELO daemon2.darkdragon.lan) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Wed, 14 Dec 2016 17:25:49 -0000 Date: Wed, 14 Dec 2016 17:35:00 -0000 From: Andrey Repin Reply-To: cygwin@cygwin.com Message-ID: <284275774.20161214202549@yandex.ru> To: "Nellis, Kenneth" , cygwin@cygwin.com Subject: Re: Editors set x-bit (sometimes) In-Reply-To: <0D835E9B9CD07F40A48423F80D3B5A704BBD4197@USA7109MB022.na.xerox.net> References: <87h967obmc.fsf@Rainer.invalid> <0D835E9B9CD07F40A48423F80D3B5A704BBD4197@USA7109MB022.na.xerox.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-12/txt/msg00155.txt.bz2 Greetings, Nellis, Kenneth! >> From: Achim Gratz >> .. the latter is slightly less efficient and you have to >> do -print0/-0, but I tend to get it right more easily then the -exec >> stuff. > Really? I always thought the opposite. With -exec, doesn't > find invoke the command for each single found object? Depends, how do you set the find, and what the net effect you wan to achieve. > While xargs allows a single command to operate on a whole slew of objects. Which boils down to executing command every time for each argument. > For example: > find ... -exec pgm {} \; > executes pgm separately for each found object What about find ... -exec pgm '{}' + ? > while > find ... | xargs pgm > invokes pgm only once for as many files as will fit on the > command line, which is quite a few. > If I'm wrong about this, please share. It really depends on what you are doing with find. find . -iname *.php -execdir grep -qP '(?<=function )funcname' '{}' \; -print is one thing, but find . -date +7 -exec mv -t /dir '{}' + is completely another. > Or, perhaps we are talking about commands that only take > a single object. In that case, you would need to say > xargs -n1 > in which case, I agree, it is less efficient. -- With best regards, Andrey Repin Wednesday, December 14, 2016 20:13:08 Sorry for my terrible english... -- 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