\section{cpio **}
\begin{frame}
   {Using cpio for Backups}

   \begin{itemize}
      \item Create an archive: use \texttt{-o} or
      \verb?--create?
      \begin{cmd}
$ ls | cpio --create -O /dev/st0
      \end{cmd}
      \item Extract from an archive: use \texttt{-i} or
      \verb?--extract?
      \begin{cmd}
$ cpio -i somefile -I /dev/st0
      \end{cmd}
      \item List contents of an archive: use \texttt{-t} or
      \verb?--list?
      \begin{cmd}
$ cpio -t -I /dev/st0
      \end{cmd}
   \end{itemize}

\end{frame}

\cprotect\note{

   \textbf{cpio} (\textbf{c}o\textbf{p}y \textbf{i}n and
   \textbf{o}ut) is a general file archiver utility that
   has been around since the earliest days of
   \textbf{UNIX} and was originally designed for tape
   backups.  Even though newer archiving programs (like
   \textbf{tar} which is not exactly young) have been
   deployed to do many of the tasks that were once in the
   domain of \textbf{cpio}, it still survives.

   The \textbf{rpm2cpio} utility can be used o convert
   \textbf{RPM} packages into \textbf{cpio} archives and
   then extract them.  Also the \textbf{Linux} kernel uses
   a version of \textbf{cpio} internally to deal with
   \textbf{initramfs} and \textbf{initrd} initial ram
   filesystems and disks during boot.  One reason
   \textbf{cpio} lives on is that it is lighter than
   \textbf{tar} and other successors, even if it is
   somewhat less robust.

   You can specify the input (\texttt{-I device}) or
   output (\texttt{-O device}) or use redirection on the
   command line.

   The \texttt{-o} or \verb?--create? option tells
   \textbf{cpio} to copy files out to an
   archive. \textbf{cpio} reads a list of file names (one
   per line) from standard input and writes the archive to
   standard output.

   The \texttt{-i} or \verb?--extract? option tells
   \textbf{cpio} to copy files in from an archive, reading
   the archive from standard input.  If you list file
   names as patterns (such as \texttt{*.c}) on the command
   line, only files in the archive that match the patterns
   are copied from the archive.  If no patterns are given,
   all files are extracted.

   The \texttt{-t} or \verb?--list? option tells
   \textbf{cpio} to list the archive contents.  Adding the
   \texttt{-v} or \verb?--verbose? option generates a long
   listing.
}




