Path: utzoo!mnetor!uunet!portal!cup.portal.com!itkin From: itkin@cup.portal.com Newsgroups: comp.unix.questions Subject: Re: How can I read a cpio archive with absolute pathnames? Message-ID: <4019@cup.portal.com> Date: 22 Mar 88 05:31:33 GMT References: <407@vsi.UUCP> Organization: The Portal System (TM) Lines: 22 XPortal-User-Id: 1.1001.3249 > Customers are always dumping cpio archives to floppy with > > find / -print | cpio ... > >and it drives us crazy when we need to restore something and they >have used full pathnames. Are there methods short of either the >interactive rename mechanism or making a silly chroot environment >for it? Wouldn't it be really helpful if cpio had an option that >could edit the start of the path to (say) prepend "." or strip off >parts? >-- >Steve Friedl, KA8CMY ARPA/UUNET/CSNet: friedl@vsi.com *Hi Mom* >{kentvax, uunet, attmail, {ucbvax, ihnp4, sun}!amdcad!uport}}!vsi!friedl This is one of those rare uses for the CHROOT command. The steps are: chroot /sparedir cpio... I'd read the manual very carefully, and try it with something not too destructive. Once done, the files will have been retrieved RELATIVE TO /sparedir AS THOUGH IT WERE THE ROOT. You can then move them or whatever you want to do with them.