Discussion:
git: ed1e8451a5 - main - books/handbook/basics: Use less confusing whatis(1) example.
Ceri Davies
2021-05-24 08:56:13 UTC
Permalink
The branch main has been updated by ceri:

URL: https://cgit.FreeBSD.org/doc/commit/?id=ed1e8451a507305a18a5da67324708b9726e8e0c

commit ed1e8451a507305a18a5da67324708b9726e8e0c
Author: Ceri Davies <***@FreeBSD.org>
AuthorDate: 2021-05-24 08:51:18 +0000
Commit: Ceri Davies <***@FreeBSD.org>
CommitDate: 2021-05-24 08:54:27 +0000

books/handbook/basics: Use less confusing whatis(1) example.

If, as suggested by the Basics chapter in the handbook, one does:

% cd /usr/bin
% man -f * | more

the result is a number of warnings due to filenames like c++ and
flex++ being treated as expressions.

Two ways to handle this:

1) Explain that one should use "man -f -- *" and why;
2) Avoid the problem and use "cd /usr/sbin" instead.

Option 1 is more appropriate for this stage of the handbook

Approved by: blackend (mentor)
---
documentation/content/en/books/handbook/basics/_index.adoc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/documentation/content/en/books/handbook/basics/_index.adoc b/documentation/content/en/books/handbook/basics/_index.adoc
index 3755b4a547..7c0c35a27c 100644
--- a/documentation/content/en/books/handbook/basics/_index.adoc
+++ b/documentation/content/en/books/handbook/basics/_index.adoc
@@ -1515,11 +1515,11 @@ If the name of the manual page is unknown, use `man -k` to search for keywords i

This command displays a list of commands that have the keyword "mail" in their descriptions. This is equivalent to using man:apropos[1].

-To read the descriptions for all of the commands in [.filename]#/usr/bin#, type:
+To read the descriptions for all of the commands in [.filename]#/usr/sbin#, type:

[source,shell]
....
-% cd /usr/bin
+% cd /usr/sbin
% man -f * | more
....

@@ -1527,7 +1527,7 @@ or

[source,shell]
....
-% cd /usr/bin
+% cd /usr/sbin
% whatis * |more
....

Loading...