Commit Graph

29 Commits

Author SHA1 Message Date
Samanta Navarro 117ddbeedc whereis: do not strip suffixes
The whereis implementations of FreeBSD, macOS, NetBSD, and OpenBSD do
not strip suffixes. Although whereis is not a POSIX tool and has no
shared standard, even its manual page indicates that the supplied names
are command names.

Commands do not have a suffix on Linux systems.

Stripping suffixes actually leads to issues with tools like fsck.ext4,
since fsck.ext4 is not the same tool as fsck and definitely not the same
tool as fsck.minix.

Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
2020-11-04 11:43:09 +00:00
Bjarni Ingi Gislason 8292383df7 doc: misc-utils/*: Fix some warnings from "mandoc -T lint"
mandoc: ./misc-utils/cal.1:214:2: WARNING: skipping paragraph macro: br after sp
mandoc: ./misc-utils/cal.1:216:2: WARNING: skipping paragraph macro: br before sp
mandoc: ./misc-utils/cal.1:225:2: WARNING: skipping paragraph macro: PP after SH

mandoc: ./misc-utils/findfs.8:36:2: WARNING: skipping paragraph macro: br after sp
mandoc: ./misc-utils/findfs.8:38:2: WARNING: skipping paragraph macro: br before sp
mandoc: ./misc-utils/findfs.8:41:2: WARNING: skipping paragraph macro: br before sp
mandoc: ./misc-utils/findfs.8:44:2: WARNING: skipping paragraph macro: br before sp
mandoc: ./misc-utils/findfs.8:48:2: WARNING: skipping paragraph macro: PP empty

mandoc: ./misc-utils/logger.1:118:15: STYLE: unterminated quoted argument
mandoc: ./misc-utils/logger.1:231:2: WARNING: skipping paragraph macro: IP empty

mandoc: ./misc-utils/look.1:116:2: STYLE: fill mode already disabled, skipping: nf

mandoc: ./misc-utils/hardlink.1:1:5: STYLE: lower case character in document title: TH hardlink
mandoc: ./misc-utils/hardlink.1:1:2: WARNING: missing date, using today's date: TH
mandoc: ./misc-utils/hardlink.1:9:2: WARNING: skipping paragraph macro: PP after SH
mandoc: ./misc-utils/hardlink.1:52:2: WARNING: skipping paragraph macro: PP after SH
mandoc: ./misc-utils/hardlink.1:65:2: WARNING: skipping paragraph macro: PP after SH

mandoc: ./misc-utils/rename.1:65:2: WARNING: skipping paragraph macro: PP empty
mandoc: ./misc-utils/rename.1:65:2: WARNING: skipping paragraph macro: PP empty
mandoc: ./misc-utils/rename.1:97:2: WARNING: skipping paragraph macro: PP empty
mandoc: ./misc-utils/rename.1:107:2: WARNING: skipping paragraph macro: PP empty
mandoc: ./misc-utils/rename.1:116:2: WARNING: skipping paragraph macro: PP empty

mandoc: ./misc-utils/whereis.1:82:2: WARNING: line scope broken: IP breaks TP
mandoc: ./misc-utils/whereis.1:152:2: WARNING: skipping paragraph macro: PP empty

####

  There is no change in the ouput of "nroff" or "groff", except for

1) a very long line in "logger.1".

2) '-' changed to '\-' for a option in "logger.1".

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
2020-06-15 11:28:01 +02:00
Michael Kerrisk (man-pages) 3bc92f313a Manual pages: rename EXAMPLE section to EXAMPLES
Earlier, I patched various pages to consistently use EXAMPLE as a
section heading, rather than EXAMPLES.  (At that time, both headings
occurred in util-linux, with roughly equal frequency.)

Since then, I've observed that EXAMPLES is the more common usage
across a large corpus of manual pages. So, in Linux the man-pages
project, I switched to using EXAMPLES also. This patch makes the same
change for util-linux.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
2020-05-28 14:51:54 +02:00
Michael Kerrisk (man-pages) 67e63c1263 Manual pages: order NOTES / HISTORY / BUGS / EXAMPLE consistently
There is value in ensuring that manual page sections use consistently
named sections, as far as possible, and also that sections have a
consistent order within manual pages. This is one of a series of patches
to place manual page sections in a consistent order.

In this patch, we ensure that the NOTES, HISTORY, BUGS, and EXAMPLE
sections are always placed near the end of the page, just above
AUTHORS, COPYRIGHT, SEE ALSO, and AVAILABILITY.

One page is not fixed by this patch: term-utils/agetty.8. This page
is a mess of unusual section names, and probably requires an individual
edit.

Testing that no gross editing mistake (causing accidental loss or addition
of text) was performed as follows:

    $ cat $(grep '\.SH' -l $(find . -name '*.[1-9]') |sort) | sort > a
    [Apply patch]
    $ cat $(grep '\.SH' -l $(find . -name '*.[1-9]') |sort) | sort > b
    $ diff a b
    $ echo $?
    0

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-22 10:25:50 +02:00
Michael Kerrisk (man-pages) 5a82980632 docs: (man) remove double quotes (") in .SH lines
Using double quotes in .SH lines containing multiple words is unneeded,
and in any case is not consistently done in the util-linux manual pages,
where double quotes are used in only around half of the cases.
(This usage was long ago elminated in the man-pages project, with
no ill effects reported to date.)

Remove these quotes, so that .SH lines are more uniform, in preparation
for some (more easily) scripted doiscovery of consistency problems in
(and possibly global fixes to) the manual pages.

Other than stripping the double quotes, this patch makes no changes to
the content of the manual pages.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-19 12:15:34 +02:00
Bjarni Ingi Gislason 1c4c602427 man pages: Change a HYPHEN-MINUS (-) to a minus (\-) for options and numbers
Change a HYPHEN-MINUS (code 0x55, 2D) to a minus (\-), if in front of

1) a name of an option

2) a negative number to be printed.

  See man-pages(7) [Debian package "manpages"].

  The output from "nroff" is unchanged.

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
2019-12-17 12:32:43 +01:00
Bjarni Ingi Gislason 0bb7e904d7 man: Use the correct macro for a font change of one argument
Use the correct macro (I, B) for the font change of one argument, not
those that are used for alternating two fonts, like "BR", "IR", "RB",
or "RI".

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
2018-05-23 10:43:27 +02:00
Ruediger Meier 5aaa966dcd whereis: add --help and --version
We can use errtryhelp() now and never print usage to stderr.
One may improve all these "bad usage" messages.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2017-06-22 21:34:58 +02:00
Sébastien Helleu d673b74e9d docs: replace FTP by HTTPS in kernel.org URLs
The links to ftp://ftp.kernel.org/ are replaced by
https://www.kernel.org/.

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-12-19 11:22:26 +01:00
Michael Kerrisk 46f057ed37 docs: various pages: Format pathnames as italic (.I)
In the majority of pages, pathnames are formatted as Italic,
which is the norm. However, there are several cases where they
are formatted as bold. This patch fixes a number of those
exceptions.

Signed-off-by: Michael Kerrisk <mtk.man-pages@gmail.com>
2016-12-09 13:45:09 +01:00
Mike Place b1c9817eff whereis: trivial spelling and grammar fix
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-04-07 10:44:50 +02:00
Karel Zak 47dd69188a docs: add info about *_DEBUG= to man pages
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-02-03 11:16:46 +01:00
Karel Zak db0ccb761d whereis: lookup also info docs
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-02-02 11:15:47 +01:00
Benno Schulenberg f49ccec212 docs: don't use bold or italics for "[option]" in synopsis of man pages
As per the convention shown in Documentation/howto-man-page.txt.
Also make a few other tiny adjustments along the way.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-12-19 09:57:23 +01:00
Benno Schulenberg 2e6f289a4e docs: spelling, wording, and grammar fixes in the man page of whereis
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-10-31 10:39:06 +01:00
Karel Zak f4802c9011 whereis: reset search mask more carefully
# whereis -m cal -M /usr/share/man/man1/ -f ls
 cal: /usr/share/man/man1/cal.1.gz /usr/share/man/man1p/cal.1p.gz
 ls: /usr/bin/ls /usr/share/man/man1/ls.1.gz

the -M also resets the search mask, so for 'ls' it returns also
binaries. That's bug. Expected result is:

 # ./whereis -m cal -M /usr/share/man/man1/ -f ls
 cal: /usr/share/man/man1/cal.1.gz /usr/share/man/man1p/cal.1p.gz
 ls: /usr/share/man/man1/ls.1.gz

the search mask has to be sensitive only to -b -m -s options,
otherwise the semantic is pretty messy.

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-10-23 14:29:45 +02:00
Sami Kerola d6590ebd70 docs: generic whereis.1 clean up
Align with howto-man-page.txt, and more importantly remove out dated 'SEE
ALSO' and 'BUGS' sections.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-03-19 16:10:03 +01:00
Sami Kerola ccec32a121 whereis: support MANPATH environment variable
The MANPATH has been around long enough that it can be added to whereis
default search path.

Reference: manpath(1)
Addresses: http://pubs.opengroup.org/onlinepubs/7908799/xbd/envvar.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-19 16:09:38 +01:00
Sami Kerola 3bfb96365d whereis: add search scope listing option
Mostly useful when debugging why the command does, or does not, work.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-19 16:02:32 +01:00
Benno Schulenberg 2e1d40c63f textual: fix the example in whereis man page, plus further improvements
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-01-30 15:41:20 +01:00
Sami Kerola ed56c96731 docs: add line breaks to whereis.1
Fix to tools script checkmans.sh warning.

testing: /home/src/util-linux/misc-utils/whereis.1
:120: warning [p 1, 10.8i, div `an-div', 0.0i]: can't break line

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-10-19 16:58:57 +02:00
Ville Skyttä ddfc5ed6f2 docs: man page syntax fixes
Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
2012-07-16 18:09:21 +02:00
Karel Zak 25206ba67b whereis: cleanup man page, add note about $PATH
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=835211
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 09:53:51 +02:00
Benno Schulenberg 232dc924c4 docs: uniformize the header and footer lines in man pages
Use dates without the day, use the full month name, put "util-linux" in
the lower left corner, and "User Commands" or "System Administration"
at the top center.

Also improve here and there the one-line program description.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2011-08-22 10:39:21 +02:00
Karel Zak 601d12fb10 rename util-linux-ng back to util-linux
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-30 11:41:59 +01:00
Peter Breitenlohner fd5ccc6969 whereis.1: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:08 +02:00
Karel Zak 86d62711a9 man pages: add "AVAILABILITY" section
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-03 01:17:04 +02:00
Karel Zak 2b6fc908bc Imported from util-linux-2.8 tarball. 2006-12-07 00:25:35 +01:00
Karel Zak 6dbe3af945 Imported from util-linux-2.2 tarball. 2006-12-07 00:25:32 +01:00