Hacker News new | ask | show | jobs
by baroffoos 2556 days ago
I find manpages to be mostly useless because they ignore the common case to explain every single possible function. For example I use the tar command 99% of the time for extracting files and 1% of the time compressing files. When I open the manual I want to be able to quickly work out how to extract a file but the first bit of non intro text on the man page is

>Options to GNU tar can be given in three different styles. In traditional style, the first argument is a cluster of option letters and all subsequent arguments supply arguments to those options that require them. The arguments are read in the same order as the option letters. Any command line words that remain after all options has been processed are treated as non-optional arguments: file or archive member names. For example, the c option requires creating the archive, the v option requests the verbose operation, and the f option takes an argument that sets the name of the archive to operate upon. The following command, written in the traditional style, instructs tar to store all files from the directory /etc into the archive file etc.tar verbosely listing the files being archived:

Scanning through the manpage a fair way down and I can't see the one bit info that covers almost all of my use cases for tar.

And for anything more complex than a tiny cli tool the manpage is far too large to use usefully.

4 comments

For the specific example of tar, the EXAMPLES section of the man page covers what I typically need, but that's not true for all man pages.
For some reason my copy of the tar manpage on fedora has no examples section
but there is a dozen ways to compress files, and only one way to extract them (for each compression format). i need the tar manpage much more when i compress, and rarely when i decompress.
one of the very first thing in tar's man page is an example of how to extract a file: https://linux.die.net/man/1/tar

but what evs. sometimes the man page is the thing, sometimes not.

TLDR pages (https://github.com/tldr-pages/tldr) are nice exactly for this use case.

There's also a web interface, for tar that'd be: https://tldr.ostera.io/tar