X-Recipient: archive-cygwin AT delorie DOT com X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8CF4F3850410 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=t-online.de Authentication-Results: sourceware.org; spf=none smtp.mailfrom=HBBroeker AT t-online DOT de Subject: Re: "ls" sorts wrongly if given large number of files To: cygwin AT cygwin DOT com References: From: =?UTF-8?Q?Hans-Bernhard_Br=c3=b6ker?= Message-ID: Date: Wed, 6 Jan 2021 20:43:37 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Language: de-DE X-ID: VUqi8EZFYhlyZjPEnAxeEd4gmgz0hJeL3zNEgolVCGRGzG1oAVhHAF1Y2vpXMH9Zde X-TOI-EXPURGATEID: 150726::1609962216-0000355B-0C23D090/0/0 CLEAN NORMAL X-TOI-MSGID: 64274cae-aea4-4f7f-ab26-17a3f6bd9f98 X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00, FREEMAIL_FROM, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: cygwin-bounces AT cygwin DOT com Sender: "Cygwin" Am 06.01.2021 um 19:17 schrieb Kamran via Cygwin: > Hi all > > "ls" (version 8.26) sorts wrongly if given large number of files via > "find" or "xargs" Actually ls is working just fine here. You just misunderstand how "find" works in this case. To see what actually happens, you should run find -type f -exec echo {} + | wc -l in that same directory you did your test case in. You'll find it does _not_ print 1. Now ponder what that means. For further information, RTFM at: info "finding files" Actions run multi about how find builds the command lines it sends to the programs to be run by "-exec" -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple