Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-18-2006, 06:37 AM   #1
LQ Newbie
Registered: Feb 2006
Posts: 17

Rep: Reputation: 0
cpio restoring subdirectories


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.

Old 06-18-2006, 07:40 AM   #2
Senior Member
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 60
Maybe using --extract ...
For example:
cpio --extract "mudd" "testing" < /dev/fd0
This will extract files with "mudd" or "testing" in their names.
Old 06-18-2006, 08:13 AM   #3
LQ Newbie
Registered: Feb 2006
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks but

--extract is equivalent to -i.

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

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

(Ie: adding quotes) it works. Thanks

Last edited by bratieres; 06-18-2006 at 11:34 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Backing Up and Restoring Using the cpio Command in Linux and Unix LXer Syndicated Linux News 0 05-26-2006 02:33 PM
using cpio ksun Linux - Newbie 4 05-12-2006 06:14 AM
Makefile and subdirectories pycoucou Programming 4 08-18-2005 05:43 AM
How to use cpio to extract a cpio archive? linx win Debian 4 06-17-2005 02:53 PM
cpio.gz?? unprocessed Linux - Newbie 7 09-11-2002 05:37 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:57 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration