Introduction to cpio

The cpio package contains tools for archiving.

This package is known to build and work properly using an LFS-7.7 platform.

Package Information

CPIO Dependencies


texlive-20140525 (or install-tl-unx)

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/cpio

Installation of cpio

Install cpio by running the following commands:

sed -i -e '/gets is a/d' gnu/stdio.in.h &&

./configure --prefix=/usr \
            --bindir=/bin \
            --enable-mt   \
            --with-rmt=/usr/libexec/rmt &&
make &&
makeinfo --html            -o doc/html      doc/cpio.texi &&
makeinfo --html --no-split -o doc/cpio.html doc/cpio.texi &&
makeinfo --plaintext       -o doc/cpio.txt  doc/cpio.texi

If you have texlive-20140525 installed and wish to create PDF or Postscript documentation, issue one or both of the following commands:

make -C doc pdf &&
make -C doc ps

To test the results, issue: make check.

Now, as the root user:

make install &&
install -v -m755 -d /usr/share/doc/cpio-2.11/html &&
install -v -m644    doc/html/* \
                    /usr/share/doc/cpio-2.11/html &&
install -v -m644    doc/cpio.{html,txt} \

If you built PDF or Postscript documentation, install it by issuing the following commands as the root user:

install -v -m644 doc/cpio.{pdf,ps,dvi} \

Command Explanations

sed -i -e '/gets is a/d' gnu/stdio.in.h &&: This fixes an incompatibility with glibc-2.16.0.

--bindir=/bin: This parameter installs cpio to /bin instead of /usr/bin as recommended by the FHS guidelines.

--enable-mt: This parameter forces the building and installation of the mt program.

--with-rmt=/usr/libexec/rmt: This parameter inhibits building the rmt program as it is already installed by the Tar package in LFS.


Installed Programs: cpio and mt
Installed Libraries: None
Installed Directories: /usr/share/doc/cpio-2.11

Short Descriptions


copies files to and from archives.


controls magnetic tape drive operations.

Last updated on 2015-02-20 21:50:01 -0800