git: abb91a60f286 - stable/12 - find.1: explain why "find -s" may differ from "find | sort"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 29 Jul 2022 02:20:12 UTC
The branch stable/12 has been updated by eugen:
URL: https://cgit.FreeBSD.org/src/commit/?id=abb91a60f286ea30d1f841d6f872275d368e3dee
commit abb91a60f286ea30d1f841d6f872275d368e3dee
Author: Eugene Grosbein <eugen@FreeBSD.org>
AuthorDate: 2022-07-22 11:39:47 +0000
Commit: Eugene Grosbein <eugen@FreeBSD.org>
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