On 19:24 14 Sep 2003, Herculano de Lima Einloft Neto <[EMAIL PROTECTED]> wrote: | Is it possible to extract a file from a cpio archive ignoring the | original archiving path, or setting a new path?
With GNU cpio you can use the --no-absolute-filenames option on extraction. I found this in the cpio "info" page (run "info cpio" - ick!) by searching for the word "relative". It was the second hit. Sadly, the GNU manual entry for cpio is the usual "we only speak info" useless travesty of a manual entry. In general it's best to make archives (both tar and cpio) with relative paths in the first place if you can. Then you won't ever have this issue. For example, instead of saying this: tar cf archive.tar /foo/bah say this: cd /foo/bah tar cf /somewhere/else/archive.tar . or: cd /foo tar cf /somewhere/else/archive.tar bah (Note: _never_ put the archive inside the stuff to archive - it can grow forever because at somepoint tar or cpio will start archiving the archive, into itself!) Cheers, -- Cameron Simpson <[EMAIL PROTECTED]> DoD#743 http://www.cskk.ezoshosting.com/cs/ How in the _hell_ did you manage to get out of a ticket for _anything_ in the Peoples' Republic of Ohio?! I have _never_ driven through Ohio and seen the driver _not_ get a ticket. - John Novak <[EMAIL PROTECTED]> -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://www.redhat.com/mailman/listinfo/redhat-list