From nobody Mon Oct 26 11:07:18 2026 X-Original-To: dev-commits-src-branches@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 4jCrS663zDz6xRf9 for ; Mon, 26 Oct 2026 11:07:18 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jCrS65SFZz4DxR for ; Mon, 26 Oct 2026 11:07:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793012838; 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=a3w3IQF2GeKKoaIePTfK+jdQMnP5qqRTccrF4Pi6mWk=; b=Jx0Jji0WXqzHy+dF4Wx7L9ZZPxoRsb89aW79AtUsOGjU92uUxx6JkkAczDyx4zfNr4RVOO S4LpBcWmA5wI+JEwcAiChk1HV7WkeA/0lRG8S4/BmF/r1ByLY/kWskapfRUhZN7JicvHUD VH+jYAgYVPrJb/zDbNgbK5iZ5+ciyo2gAs6WlJF8V+Mn+HCz/Tt0ly/7j+vtx4Zy/nrIrZ Q9T3XpLzb421ygjoCttY2BEA9HUYeBLwVlSUtekin6FcruBzZHT5EiMTq2Ulo60mFMINbx R18MXu5SjW9+2SKFxW/S1PMCIdO7Hs1QBd44rCJe32ULZ3/9K+IFKs8s1BmYhg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793012838; b=h4Z59pc3xalK0oZMhJNAw9fEcdcAFBfPvqwsEWZ5KXsKrKXAiyQzZmfM+PrCAVFNLy+MBz fz+3mncGDkEH+lvocz2lXcjCXS9mTjeEs7u3+ekmcE3CUyiCqN8/6fWdSfDpM4y8pDK6RJ 9Go81ps7h3vejIPJIRWbfw5ljzWWwuHUc0OUZGpTTyOJQIJwWAGux/TQs42tCOeuG8jGok Ci+xZalf6r405+XrRfaSNDo+i30krP0cO0j/yIcr1nowRYFJXWlYq/IOkDr+/W6hsbmZtd 7PzfePevC7LNu/LAPxtizgJb49NeWWQga5YRDojFFGk2r603zTt/ZKmdE3+qbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793012838; 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=a3w3IQF2GeKKoaIePTfK+jdQMnP5qqRTccrF4Pi6mWk=; b=vMZs6o1t3TQrQHvpLVACeZdLOSGQ7xHfRtXujqR/BslFtQEkAQ4Tu4AcW22emGWxD1mNOg 35YCmcoDaKIHWx8kOSSBXTsYoa/mzkosmwyB2Hj3LqUNiPkft2iv9A4HoqYCDBBVEcL8E6 NGaYJUA+hCxFM02SBXR2mmwIK+H6MPvvT1xyuohcouFItaa+bMDScUEoudzfgBOskKH0cI Y3EOToMY9XMPrlMUNX7H2shR7nJPreXPLkEv0LYlNlkE3ElOHBVh4k7FIZcsE/QwWzYMMD VPAt+3REQUdEoP4HcRbumiit32sYLbFkpSH+neMpMvXDmYe46/jaunkFhMBLeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jCrS656d7zVxx for ; Mon, 26 Oct 2026 11:07:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1ffa6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 26 Oct 2026 11:07:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wolfram Schneider Subject: git: 4b0fb442dc2f - stable/15 - find.1: rewrite the -s flag section for clarity List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4b0fb442dc2f715fcfe8a6d31628c83acea0f6f6 Auto-Submitted: auto-generated Date: Mon, 26 Oct 2026 11:07:18 +0000 Message-Id: <6adf3466.1ffa6.3ca6a7d8@gitrepo.freebsd.org> The branch stable/15 has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=4b0fb442dc2f715fcfe8a6d31628c83acea0f6f6 commit 4b0fb442dc2f715fcfe8a6d31628c83acea0f6f6 Author: Wolfram Schneider AuthorDate: 2026-10-22 08:50:56 +0000 Commit: Wolfram Schneider CommitDate: 2026-10-26 11:06:17 +0000 find.1: rewrite the -s flag section for clarity Restructure the description of -s flag: 1. what the option does 2. why it is useful (deterministic order, streaming output) 3. how its results can differ from `find | sort' Reviewed by: ziaee MFC after: 3 days (cherry picked from commit ad0f86694157c998fec500e9a553550976cbc100) --- usr.bin/find/find.1 | 41 +++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/usr.bin/find/find.1 b/usr.bin/find/find.1 index d3929bcb1807..05054fe84e6a 100644 --- a/usr.bin/find/find.1 +++ b/usr.bin/find/find.1 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 14, 2026 +.Dd October 20, 2026 .Dt FIND 1 .Os .Sh NAME @@ -149,23 +149,44 @@ and Cause .Nm to traverse the file hierarchies in lexicographical order, -i.e., alphabetical order within each directory. -Note: -.Ql find -s +sorting entries within each directory. +.Pp +The output order is deterministic for a given locale and does not +depend on the type of +file system or on the order in which directory entries were created. +This is useful for comparing results between runs, reproducible +builds, and automated tests. +.Pp +Since entries are sorted per directory, +.Ql "find -s" +typically uses less memory and temporary disk space than +.Ql "find | sort" . +Unlike +.Ql "find | sort" , +.Ql "find -s" +can produce output while the traversal is still in progress, +allowing a long-running pipeline such as +.Ql "find -s . -print0 | xargs -0 -n1 /slow/script" +to begin processing files immediately. +The predictable order also makes the progress easy to follow, +e.g., with +.Xr ps 1 . +.Pp +Note that +.Ql "find -s" and .Ql "find | sort" may give different results. -.Pp For example, -.Ql find -s +.Ql "find -s" puts a directory .Ql Ar foo with all its contents before a directory -.Ql Ar foo.\& +.Ql Ar foo\&. , but .Ql "find | sort" puts the directory name -.Ql Ar foo.\& +.Ql Ar foo\&. before any string like .Ql Ar foo/bar because @@ -174,8 +195,8 @@ goes before .Ql / in ASCII. In locales other than -.Ar C -results may vary more due to collation differences. +.Ar C , +the two may differ further because of locale-dependent collation. .It Fl x Prevent .Nm