How To Use Cpio In Linux?

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/use-cpio-linux/
PINTEREST
PINTEREST
INSTAGRAM

cpio is general file archiver used in Linux, Unix and Bsd systems. It is created as a tape archive tool but gained new features along development. Cpio has its own compression format and extension.

Creating Archive With Cpio

We can create archive file with cpio by getting find output.

We use find to list all files in current working path and print all of them to the cpio to compress with its format.

We can create tar archive with cpio by specifying compression algorithm as tar.

  • -o is output file
  • -H tar specifies the compression algorithm will be tar

List Files Inside Cpio Archive

We can list files inside a cpio arhive

  • -F makes listing the files

Write Archive Into A Tape

We can write archive into a tape like below.

Extract Archive

Extracting is easy as archiving

All files will be extracted to their original paths

Archive Into Remote System Tape

This is very useful and practical solution. Archiving can be done to the remote system tape file like below.

Track Operation With Verbose

Compression operation can be tracked by using verbose option which will give details about compression operation.

LEARN MORE  Libvirt Tutorial

  • -v argument makes the command verbose

Supported Compression Algorithms and Formats

 

 

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/use-cpio-linux/
PINTEREST
PINTEREST
INSTAGRAM

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)