cpio command cheat sheet

· klm's blog


Original post is here: eklausmeier.goip.de

cpio is a command, which is less used than tar. So the required options are often forgotten. cpio needs the < redirection to get its archive from stdin.

  1. List content of cpio-archive: cpio -tv < archive
  2. Extract data out of cpio-archive: cpio -idmv < archive, -i is extract, -d creates required directories, -m preserves modification times

rpm-files are essentially cpio-archives or compressed cpio-archives.