delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/01/06/14:44:36

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: <DB8P191MB06363D09B9C9E54A289AAB7AB4D00 AT DB8P191MB0636 DOT EURP191 DOT PROD DOT OUTLOOK DOT COM>
From: =?UTF-8?Q?Hans-Bernhard_Br=c3=b6ker?= <HBBroeker AT t-online DOT de>
Message-ID: <b968dd1e-0ae7-ad94-8ba0-963a88f080a7@t-online.de>
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: <DB8P191MB06363D09B9C9E54A289AAB7AB4D00@DB8P191MB0636.EURP191.PROD.OUTLOOK.COM>
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
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019