From nobody Fri Jul 22 11:42:40 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Lq6xX6Y5qz4X2yC; Fri, 22 Jul 2022 11:42:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Lq6xX615Wz437B; Fri, 22 Jul 2022 11:42:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658490160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OoTmM2mAVUQ8T44NTISw1T0jWBkORKEb0omhurS2G+4=; b=Eh2d5dhfOmy/rPMLNGuvl5NKhsLrBdE1JsPanHMyi9OIlSMwo+/9Ad3GEX86XECYM0WCIe yBagOegdMVuv9LJGE3fuTe5sNHvGXWvfn1lXMEOniofUEFfMxCVpDQ+NwNaDr8XWOl/q4m hG5+TAuRiRdUKE9u3vPeGBlRM/RID9KnErH0ENpVtQ5FUCbabqPG0xh5ndpVadkB6wecW5 Kx9RI/c8LuBJsoBJ2MgIrXnGpcAaxBvFxjd8TtB2SApvoIkeg+jf3ig3wMK+T3y+6nR7ni QCS9Sa4oi0CdlR02jyx1nqtiu8bREF41r3ruYcMcc6EMpd1x9v/6IV+FXRLTGw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Lq6xX52Ptz10Ty; Fri, 22 Jul 2022 11:42:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 26MBgeDM096247; Fri, 22 Jul 2022 11:42:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26MBgeWZ096246; Fri, 22 Jul 2022 11:42:40 GMT (envelope-from git) Date: Fri, 22 Jul 2022 11:42:40 GMT Message-Id: <202207221142.26MBgeWZ096246@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eugene Grosbein Subject: git: 26a329f49fb4 - main - find.1: explain why "find -s" may differ from "find | sort" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 26a329f49fb4537d598e93f16054fd9e16f7e677 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658490160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OoTmM2mAVUQ8T44NTISw1T0jWBkORKEb0omhurS2G+4=; b=SvnAtd0ONJLgtcCAGF2v8gU+pM25PKtnkJmReDBb1MXS9f7Jfmu7oauWJUgF9SNavJHbgO 1O+o458A1dWTg9ty5WUfNLSEZZW1Lh6Lb87W6QbCLtbuvOGHaNVkwh31808HW4khBpWobe 0flo1xuGcvNJ8gmKmfP3f+n43mQ0M+KDZxq1RXK2MKF33ilQGRa7ef0/XUK/d7ml0rDN+C BGXlQH2E9sgR+4t8xow5dF8swhtrvYIgm4ZdPvhPlXPeJyuuDmytOoq+Yp11BRKhsgdB+e 4PYUwG69MySm8GcN9eoIljswNpbZ+YQd6oH/MYo8/KC+XN5nxgfjhXtZ4SyOLw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658490160; a=rsa-sha256; cv=none; b=DUZx95jZoLnDwVrwRquE+JG21z/wu2L+BYLVw7btgkRuO0yalfMdT5nEF/y/In8Th3zLGl ZER4HMMlfOrIYXXF2O6wfQQfQUEMfsw2d3rH3oHt3eH7FkUo5RwCbk9Dqn1YpQ4xwS6q2G gUzkW9LO/zDM5ivjeE7QkRHrdnGAYAxerk04gTAIJfvLEisZWs0J+c9Tlhs15bw5KSBzFi e1NyPHXAXW4F3rPUMqO51bIm8pdCC8liWOOgzTXpAYpS1TFVc1I7acv6bXbxMz8sSmO2wp maH/iEjaYGIQhuWLTzkaXklRGg6sMf9tW+YVMNZmANU6dQULjz2X14L1DkPBEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=26a329f49fb4537d598e93f16054fd9e16f7e677 commit 26a329f49fb4537d598e93f16054fd9e16f7e677 Author: Eugene Grosbein AuthorDate: 2022-07-22 11:39:47 +0000 Commit: Eugene Grosbein CommitDate: 2022-07-22 11:39:47 +0000 find.1: explain why "find -s" may differ from "find | sort" In short, that's because a directory name may end with a character that goes before slash (/). MFC after: 1 week --- usr.bin/find/find.1 | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/usr.bin/find/find.1 b/usr.bin/find/find.1 index 72fe3c0bea06..9efb8908ee63 100644 --- a/usr.bin/find/find.1 +++ b/usr.bin/find/find.1 @@ -31,7 +31,7 @@ .\" @(#)find.1 8.7 (Berkeley) 5/9/95 .\" $FreeBSD$ .\" -.Dd November 8, 2021 +.Dd July 22, 2022 .Dt FIND 1 .Os .Sh NAME @@ -158,6 +158,26 @@ Note: and .Ql "find | sort" may give different results. +.Pp +For example, +.Ql find -s +puts a directory +.Ql Ar foo +with all its contents before a directory +.Ql Ar foo. +but +.Ql "find | sort" +puts the directory name +.Ql Ar foo. +before any string like +.Ql Ar foo/bar +because +.Ql .\& +goes before +.Ql / +in ASCII. In locales other than +.Ar C +results may vary more due to collate differences. .It Fl x Prevent .Nm