RE: CPIO question

"Steven W. Orr" <[email protected]> Thu, 13 Feb 2003 14:50:16 -0500 (EST)
Newsgroups gmane.linux.redhat.release.guinness
Message-ID <[email protected]>
On Thu, 13 Feb 2003, Ian Douglas wrote:

=>MessageYou could make your life simpler and break it into a 2-step process
=>
=>find / -print > /tmp/file.list
=>cat /tmp/file.list | cpio -vocBm > /dev/rStp0

A pet peeve of mine is that this
cat /tmp/file.list | cpio -vocBm > /dev/rStp0
is simplified to this:
cpio -vocBm > /dev/rStp0 < /tmp/file.list

But I digress. The better way to get a logfile of what you backed up vs. 
what you *wanted* to back up is this:
cd /
find . -print | cpio -vocBm > /dev/rStp0 2> logfile

Also note that cpio has other options that you may be interested in:
-H crc
-O

etc...

=>
=>
=>  -----Original Message-----
=>  From: [email protected]
=>[mailto:[email protected]]On Behalf Of Collins, Eric S.
=>  Sent: Thursday, February 13, 2003 10:53 AM
=>  To: [email protected]
=>  Subject: CPIO question
=>
=>
=>  Hi,
=>
=>          Have a quick question. I'm rewriting a backup script for some of
=>our SCO Openserver boxes. I want to use cpio to store the data to my DAT
=>drive, but I would also like to redirect the output of the find to a
=>logfile. I've tried, for the line in question:
=>
=>  dte=`date +%a` #fyi on this var
=>
=>  find / -print|cpio -vocBm > /dev/rStp0 |tee -a /u/backup/bup.files.$dte
=>#will backup to the DAT, but doens't log to the file
=>
=>  find / -print|tee find / -print|tee /u/backup/bup.files.$dte|cpio -vocBm >
=>/dev/rStp0 #will backup to DAT - doesn't write to log file
=>
=>  tee -a /u/backup/bup.files.$dte|find / -print|cpio -vocBm > /dev/rStp0
=>#this would be for input, but I figured what the heck.
=>
=>      I think by now someone, I hope, would recognize the error of my ways.
=>Any suggestions are appreciated.
=>
=>
=>  Thanks,
=>  Eric
=>

-- 
-Time flies like the wind. Fruit flies like a banana. Stranger things have -
-happened but none stranger than this. Does your driver's license say Organ
-Donor?Black holes are where God divided by zero. Listen to me! We are all-
-individuals! What if this weren't a hypothetical question?
steveo at syslang.net