McScx

McScx at

On #HPUX 10.x (1998): How can I force restoring a cpio archive to the current directory?
cpio -idv < /tmp/f.cpio
restores it to /, because the paths in this cpio archive all start with leading slashes. Unfortunately this version of cpio doesn't offer the --no-preserve-owner of GNU's cpio.

mcsox@fmrl.me, mcsox@fmrl.me shared this.

I meant: ...doesn't offer the '--no-absolute-filenames' option of GNU's cpio. There must be still a way to extract it in current dir. It's actually an archive of another HPUX box's root filesystem and if I extract it to the local /, it will overwrite my system.

mcsox@fmrl.me at 2013-08-09T18:09:12Z

Solved the problem by copying /bin/cpio and 3 library files to the current dir, then cat /tmp/f.cpio | chroot . /cpio -idmx

mcsox@fmrl.me at 2013-08-09T20:48:34Z