LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   cpio restoring subdirectories (https://www.linuxquestions.org/questions/linux-newbie-8/cpio-restoring-subdirectories-455899/)

bratieres 06-18-2006 05:37 AM

cpio restoring subdirectories
 
Hi,

Some kind of STUPID question.
We have a backup copy of a full system on a DAT.
The copy was made via cpio in relative mode.
I just want to restore /etc and all subdirectories.

cd /
cpio -idvmu -I/dev/nst0 etc/*
Just restores etc and first level directories.
So had to etc/*/* etc/*/*/* and so on.

Could not find syntax to restore in ONE cpio.

Thanks for help.

J.Bratières

homey 06-18-2006 06:40 AM

Maybe using --extract ...
For example:
cpio --extract "mudd" "testing" < /dev/fd0
This will extract files with "mudd" or "testing" in their names.

bratieres 06-18-2006 07:13 AM

Thanks but

--extract is equivalent to -i.

Perhaps shall I try with quotes (I dit not use them).


Tried
cpio -idvmu -I/dev/nst0 "etc/*"

(Ie: adding quotes) it works. Thanks


All times are GMT -5. The time now is 07:42 PM.