Enter your email address:

Delivered by FeedBurner

cpio - copy files to and from archives

cpio is a tool to copy files from one place to another, and to create archives, (like tar), or extract files from an archive file.

The good thing is that cpio takes its input from other commands like ls, or find

So you can archive all .mp3 in your home directory by entering this command:

ls *.mp3 | cpio -o --format=tar -F mymp3.tar

Or if you want to include subfolders

find $HOME -name "*.mp3" | cpio -o --format=tar -F mymp3.tar

You can list the contents of a .tar file.

cpio -it -F mymp3.tar

And extract them:

cpio -i -F mymp3.tar

Run

info cpio

for a complete tutorial.

Share/Save

Navigation

For your laptop needs, visit LaptopLogic - the laptop review site with news, articles, tips and how-to's.

Recent comments