LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-07-2006, 09:16 PM   #1
jxi
Member
 
Registered: Feb 2003
Location: Richmond VA
Distribution: Slackware 11 -- CentOS 4.4
Posts: 115

Rep: Reputation: 15
how to copy-in cpio archive to temp directory


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?
 
Old 03-08-2006, 04:15 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,393
Blog Entries: 55

Rep: Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564
and if you use cpio with --no-absolute-filenames?: "In copy-in mode, create all files relative to the current directory".
 
Old 03-08-2006, 04:32 PM   #3
jxi
Member
 
Registered: Feb 2003
Location: Richmond VA
Distribution: Slackware 11 -- CentOS 4.4
Posts: 115

Original Poster
Rep: Reputation: 15
thanks, unSpawn , that's it exactly

the description is sitting right there in info cpio but i must have overlooked it.
 
  


Reply


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:42 AM.

Main Menu
Advertisement
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
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration