LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Thread Tools
Old 03-07-2006, 10:16 PM   #1
jxi
Member
 
Registered: Feb 2003
Location: Richmond VA
Distribution: Slackware 11 -- CentOS 4.4
Posts: 115
Thanked: 0
how to copy-in cpio archive to temp directory


[Log in to get rid of this advertisement]
sometime back I had a way to copy-in from a cpio file to a temp directory,
or, to put it another way, copying directory tree(s) stored in a cpio archive
to a mount pt other than /

but I forgot how.

i;m creating cpio files with this command:
Code:
cat FILES |cpio -aov -H crc | gzip --best - > filename.crc.gz
where FILES looks like

/home/jxi/.ICEauthority
/home/jxi/.bash_history
/home/jxi/.Xauthority
...and so on. files from /home /etc /root ...

I want to copy-in (reload) the files onto a temp space for the purpose of running `diff -r` against the contents of a 'parallel' tar command's resulting file , i.e, one created in the same script about the same time.
(I'm looking at replacing tar with cpio for scheduled backups )

but when i issue e.g.,
(gunzip file into /tmp)
Code:
   mkdir /tmp/cpio_dump
   cd /tmp/cpio_dump
   cpio -i -vdm </tmp/filename.crc
... it starts trying to replace the files in their original places starting at /

if ./ follows the command it does nothing (ctrl-c is needed to kill it)

Now, cpio pass-thru mode lays down dirs, files in a new location easily as in:

Code:
cd <directory-structure-to-be-copied>
find . -xdev -print | cpio -pdumv <path_to_new_directory>
... how to get this action with copy-in mode?
jxi is offline     Reply With Quote
Old 03-08-2006, 05:15 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 16,716
Blog Entries: 30
Thanked: 283
and if you use cpio with --no-absolute-filenames?: "In copy-in mode, create all files relative to the current directory".
unSpawn is offline     Reply With Quote
Old 03-08-2006, 05:32 PM   #3
jxi
Member
 
Registered: Feb 2003
Location: Richmond VA
Distribution: Slackware 11 -- CentOS 4.4
Posts: 115
Thanked: 0

Original Poster
thanks, unSpawn , that's it exactly

the description is sitting right there in info cpio but i must have overlooked it.
jxi is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
How to use cpio to extract a cpio archive? linx win Debian 4 06-17-2005 02:53 PM
rpm install proble--cpio: Archive file not in header mlgill Linux - Newbie 0 07-24-2004 12:53 PM
Using cpio on a 26GB archive produces "File too large" mfairclough Linux - Newbie 2 06-28-2004 06:55 PM
Trying to archive a 4.6 GB directory kaplan71 Linux - General 2 04-27-2004 11:31 AM
unpacking of archive failed: cpio: read failed-input/output error rafc Linux - Newbie 0 04-21-2004 10:03 AM


All times are GMT -5. The time now is 01:44 PM.

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