CPIO archives

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Lynn David Newton
Date:  
To: nathan, Main PLUG discussion list
Subject: CPIO archives

n> <dunce cap on>


n> I have a cpio archive that I am trying to extract. I would like to dump the
n> entire archive, change some files then re-create the archive. But everytime I
n> try to extract the archive it over-writes files in my / directory tree...
n> very bad!


n> cpio -i < archive.cpio


n> How do I extract it and force it to a specific tree?


If it's doing that it probably means the archive was
created using an absolute pathname, i.e., with "/" at
the beginning.

cpio -itv < archive.cpio

will show you the paths. If they start with "/" you may
be out of luck unless you can find a way to do it in a
chroot environment. I'm unwilling to experiment with
that myself right now, but maybe someone else has a
better idea.

Man, I had to blow the dust off my cpio man page on
that one. I used to run it a hundred times a day, but
for years I've run it only in passthrough mode (-p) to
copy directories, not to create archives, since these
days tar seems to be the preferred command for creating
single file archives.

--
Lynn David Newton
Phoenix, AZ

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss