I have an CPIO archive tape that has been created using absolute paths. I now want to recover these files to an alternate location. Is there a way of striping off the path or forcing a . onto the full path ?
You can try this , but first BACK UP your current data
1. umount /usr/fred/some/thing/else
2. create a link of this FS else where i.e.
ln -s /usr/fred/some/thing/else /NEWDIR
3. restore cpio file cpio -ivcdumB < (cpio file/tape) or whatever flags you used.
4. then Cd into NEWDIR , back that up relatively
5. remove NEWDIR
6. mount original Filesystem
you should have original data intact.
Or the more belts and starps method
backup original data
restore cpio file
back that up relatively
restore original data
you will not be able to change the backup and put a dot in front of the filenames.
You can use [tt]pax[/tt] command. It can read [tt]cpio[/tt] and it can search and replace using regexes on file and path names inside archives.
I hope it works...
Unix was made by and for smart people.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.