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
|