3

man tar works and in the SEE ALSO section it references tar(5) but man 5 tar outputs No entry for tar in section 5 of the manual.

My primary goal is to get those for my OS X laptop. But I've seen them missing on Debian servers as well. brew search man doesn't offer me additional man pages to install. Any hints how to install the section 5 manpages? (tar is just an example, I'd need them in general)

1

Man section 5 is "File Formats and Conventions" and is not installed by default. see What do the numbers in a man page mean?

To install part of it on a Debian system, install:

sudo apt-get install libarchive-dev

From packages.debian.org:

Package: libarchive-dev (3.1.2-11+deb8u1)

The libarchive library provides a flexible interface for reading and writing archives in various formats such as tar and cpio. libarchive also supports reading and writing archives compressed using various compression filters such as gzip and bzip2. The library is inherently stream-oriented; readers serially iterate through the archive, writers serially add things to the archive.

Double checking if man(5) tar page is installed:

dpkg -S /usr/share/man/man5/tar.5.gz
libarchive-dev:amd64: /usr/share/man/man5/tar.5.gz

Listing the files installed/owned by the package:

dpkg -L libarchive-dev | grep man
/usr/share/man
/usr/share/man/man5
/usr/share/man/man5/tar.5.gz
/usr/share/man/man5/mtree.5.gz
/usr/share/man/man5/libarchive-formats.5.gz
/usr/share/man/man5/cpio.5.gz
/usr/share/man/man3
/usr/share/man/man3/libarchive_internals.3.gz
/usr/share/man/man3/libarchive_changes.3.gz
/usr/share/man/man3/libarchive.3.gz
/usr/share/man/man3/archive_write_set_options.3.gz
/usr/share/man/man3/archive_write_open.3.gz
/usr/share/man/man3/archive_write_new.3.gz
/usr/share/man/man3/archive_write_header.3.gz
/usr/share/man/man3/archive_write_free.3.gz
/usr/share/man/man3/archive_write_format.3.gz
/usr/share/man/man3/archive_write_finish_entry.3.gz
/usr/share/man/man3/archive_write_filter.3.gz
/usr/share/man/man3/archive_write_disk.3.gz
/usr/share/man/man3/archive_write_data.3.gz
/usr/share/man/man3/archive_write_blocksize.3.gz
/usr/share/man/man3/archive_write.3.gz
/usr/share/man/man3/archive_util.3.gz
/usr/share/man/man3/archive_read_set_options.3.gz
/usr/share/man/man3/archive_read_open.3.gz
/usr/share/man/man3/archive_read_new.3.gz
/usr/share/man/man3/archive_read_header.3.gz
/usr/share/man/man3/archive_read_free.3.gz
/usr/share/man/man3/archive_read_format.3.gz
/usr/share/man/man3/archive_read_filter.3.gz
/usr/share/man/man3/archive_read_extract.3.gz
/usr/share/man/man3/archive_read_disk.3.gz
/usr/share/man/man3/archive_read_data.3.gz
/usr/share/man/man3/archive_read.3.gz
/usr/share/man/man3/archive_entry_time.3.gz
/usr/share/man/man3/archive_entry_stat.3.gz
/usr/share/man/man3/archive_entry_perms.3.gz
/usr/share/man/man3/archive_entry_paths.3.gz
/usr/share/man/man3/archive_entry_linkify.3.gz
/usr/share/man/man3/archive_entry_acl.3.gz
/usr/share/man/man3/archive_entry.3.gz

In OS/X you have already parts of the man 5 at /usr/share/man/man5 directory. Apart from copying there the aforementioned pages, have not investigated how to install them.

  • thanks, this answer lead me to the solution for OS X (written below), accepting this as it was leading to the correct solution – hansaplast Jul 4 '16 at 15:17
3

on OSX the man pages are stored on /usr/share/man/man5/. Some of them are already installed (e.g. for fstab). But for e.g. tar it isn't.

Unfortunately there's no libarchive-dev package on homebrew. A workaround for just the man pages is to download the libarchive sourcecode for the version which is installed (tar --version) and copy the man pages over:

sudo cp doc/man/*.5 /usr/share/man/man5/
  • Yeah, that is it, aside from copying by hand have not seen a better solution, though I have not investigated extensively. +1 – Rui F Ribeiro Jul 4 '16 at 15:22
  • 1
    You might add tar --version and download the source for that version of libarchive. – fd0 Jul 4 '16 at 15:24
  • @fd0 thanks for the hint, added that to my answer – hansaplast Jul 5 '16 at 4:26
0

On a Fedora 22 system:

# rpm -qf /usr/share/man/man5/tar.5.gz
libarchive-3.1.2-14.fc22.x86_64

So try updating libarchive.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.