From nobody Fri Jul 29 02:20:12 2022 X-Original-To: dev-commits-src-all@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 4LvB7J3CQCz4XkLR; Fri, 29 Jul 2022 02:20:12 +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 4LvB7J2hccz4LXr; Fri, 29 Jul 2022 02:20:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659061212; 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=SYLXdUppFSol74BD4kj24lJQ0700X9Y1/ppnQzKKAcM=; b=BP/dPiSan7mrjG2elRAcIltdkFzJ+4z+gGRRxM1DJwR795ImqEqXOgopy5Yd+E3V6NFAgj qR6kwXhRRrJd+4Kukny9SAJ1vMdAT/v8FFnfVIB+Yd5RJwDoRuk/FiwiKIH/LZvGs2RU/Z Ct4qUKV+SdQ/36ek9InWkvGX2nW740FDShBHZi9+p6FNsZ1ert6kC9Vg6ITOpHSRJcXcjg Cm8GN8KVNHqGgQ+RLoH+EIl3G/lCEbBiFAxGgb1e2rlUddfNRf2kM7TQouQKwjMvziBmh7 ll8d/AXptt3a34thAcQ071jsZxSBEaIZOT+XhS00chTLKtgy5S4b/MkcyHp7cA== 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 4LvB7J1kMTzJPT; Fri, 29 Jul 2022 02:20:12 +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 26T2KCdQ083675; Fri, 29 Jul 2022 02:20:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26T2KCUJ083671; Fri, 29 Jul 2022 02:20:12 GMT (envelope-from git) Date: Fri, 29 Jul 2022 02:20:12 GMT Message-Id: <202207290220.26T2KCUJ083671@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eugene Grosbein Subject: git: abb91a60f286 - stable/12 - find.1: explain why "find -s" may differ from "find | sort" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/12 X-Git-Reftype: branch X-Git-Commit: abb91a60f286ea30d1f841d6f872275d368e3dee Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659061212; 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=SYLXdUppFSol74BD4kj24lJQ0700X9Y1/ppnQzKKAcM=; b=Fo8llYNI2WwhuGuq8TKJw9wmmeH0UCIFE6QbbBb/Rbch0i2aK+wl368epo3XgfJKvn/UsC fsaTD8WCJXfFRLDx+nMtdxhOW1N65gN/P88sD5aOjx4GdF90pr8kzkrhAACpfsgdDl9qUu PVYIkqYHLH6s8y/rWQ+UwLSnN3370vF9tUamuXcl0U/aVCsSBNj+B4dXpYpUriA6mI5t9L baCRzpwHER0etRP6ryq1rG91AvIavtbNKGGnaOaBDC5LHfS5A7ubGc3I3ya6xrKCWgYOAm PIaLF5QMqae8RaRwDf5Qta7wgEWkN2k/5MPUKZxLXErx+EITXZGvCML9CxRBOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659061212; a=rsa-sha256; cv=none; b=v2B4rT48zC47VgrhC9U07tpr2tIaNKDyuL6uBJ5btS5CeFMn3yD+ifDI+/CMalyycoUrdZ t05ijz1V0gDB0B8xm2L6oAZSdSVVKGqqLostg4dvhnXPrM2xaqH6djuEEasiSQfnhyI5Ov PtxyDuY7kcLiqIA7lQ8UD+3e0qAI76FxM6C+BcZEtqz2ttcvXo0tgG1zk8LIO6orc9Q7Yr aIxvtzlmL0Na6EV481fKlLLrf8YdwF/ZS26vvKEfSZTGcRoM0j6nXCjOG8akPNrvmDkKDn SptlZPlUw/QLF47QiRlaacqfZqlUxBr/GNzVqoKwbUYpPRL17y3rrORqFNfhJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=abb91a60f286ea30d1f841d6f872275d368e3dee commit abb91a60f286ea30d1f841d6f872275d368e3dee Author: Eugene Grosbein AuthorDate: 2022-07-22 11:39:47 +0000 Commit: Eugene Grosbein CommitDate: 2022-07-29 02:19:30 +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 (/). (cherry picked from commit 26a329f49fb4537d598e93f16054fd9e16f7e677) --- 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 8bc9f9d69604..e62824a70a80 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 May 13, 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