[lug] cpio

Robert racsw at frontiernet.net
Thu Apr 10 14:51:38 MDT 2003


On Tue, 2003-04-08 at 19:08, Bear Giles wrote:
> Robert wrote:
> > On Mon, 2003-04-07 at 20:38, Bear Giles wrote:
> >>>"cpio: premature end of file"
> >>
> >>You need to either use
> >>
> >>  find ... -print0 | cpio -oA0 ...
> >>
> >>or
> >>
> >>  find ... -print | cpio -oA ...
> >>
> >>The former is preferred since it will handle files with embedded 
> >>spaces.
> > 
> >   I tried both, the first results in the same error, the second brings
> > up the MAN cpio page, indicating incorrect syntax.
> 
> I just verified that both forms worked on my system, esp.
> 
>    find /etc -print0 | cpio -o0F foo
>    find /dev -print0 | cpio -o0AF foo

  Hi Bear,
    Your example works fine as I already know, but your example does not
duplicate the syntax of my original question.   What you did was back up
an entire directory, which I have no trouble with either.
Try this instead:

cd into a directory of your choice.
pick some file you don't care about, maybe a *.bak or whatever.
Now, using find, pipe that file into cpio so it archives it into your
archive file called "foo".
Try that and see how it works.  Once again, I can't find the correct
cpio syntax to append a file to a single archive file.


> Meanwhile, at the risk of having you mocked on this list for 
> months >:-)~, you have verified that the cpio archive you're 
> appending to is a valid cpio archive, right?

 cpio created the file, not me...

-- 
Robert <racsw at frontiernet.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 232 bytes
Desc: This is a digitally signed message part
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20030410/3148be62/attachment.pgp>


More information about the LUG mailing list