Linux Commands Reference - Complete Linux Command Guide

Comprehensive Linux command reference with 150+ commands. Search, filter by category, and view detailed usage examples.

Share
Back to commands

cpio

Copy files to/from archives

Syntax

cpio [OPTION]... [MODE]

Common Options

-iExtract mode
-oCreate mode
-pPass-through mode
-dCreate directories
-vVerbose output
-tList contents
-uUnconditional overwrite
-mPreserve modification time
-HSpecify archive format
-AAppend to archive

Common Examples

find . | cpio -ov > archive.cpio

Create cpio archive

cpio -iv < archive.cpio

Extract cpio archive

cpio -it < archive.cpio

List archive contents

find . -newer ref | cpio -pvdm /backup

Pass-through backup

find . -name "*.c" | cpio -ovHnewc > src.cpio

Create with format

cpio -idv < archive.cpio

Extract creating dirs

Related Commands

Related Tools

More Code & Dev Tools