LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-25-2004, 07:57 PM   #1
mchirico
LQ Newbie
 
Registered: Mar 2004
Distribution: Redhat and direct source
Posts: 27

Rep: Reputation: 15
cpio ... works like tar


Assume directories ../PAST and ../47 exists the following will create a tar
file that, yes, can be tar -xvf test.tar. cpio is just another way to create a tar
file file the "find" command.

find ../PAST/ | cpio -o --format=tar > test.tar
find ../PAST/ | cpio -o -H tar > test2.tar

Without the ">"

find ../PAST/ | cpio -o --format=tar -F test.tar
find ../PAST/ | cpio -o -H tar -F test2.tar

Using append

find ../PAST/ | cpio -o --format=tar -F test.tar
find ../47/ | cpio -o --format=tar --append -F test.tar

To list the contents

cpio -it < test.tar
cpio -it -F test.tar

To extract

cpio -i -F test.tar

Just passing a little info along...

Mike Chirico
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 14 10-25-2016 02:48 AM
tar tar cvf - . | (cd /root/; tar xvf -) ewt3y Linux - General 10 02-19-2014 10:55 AM
How to use cpio to extract a cpio archive? linx win Debian 4 06-17-2005 01:53 PM
Diferance between rpm, tar, tar.gz, scr.tar, etc mobassir Linux - General 12 08-21-2003 06:30 AM
tar or cpio - Which is better for tape backups? Br. Nicholas Linux - Software 2 07-02-2003 04:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration