[lug] cpio
Bear Giles
bgiles at coyotesong.com
Tue Apr 8 17:08:31 MDT 2003
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
From your message, I'm not sure if you typed '0' (zero) or 'O'
(capital letter between 'N' and 'P'). These are very different
options, and the man page clearly states that 'A' must be followed
by either 'O' or 'F' specifying an existing and valid cpio
archive. (It looks like 'F' specifies a local file, 'O' provides
some level of support for networked backups.)
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? Your message looks a
lot like an error you might get when attempting to append to
something that's not an archive - the error would be on the cpio
side, not the find side.
Bear
More information about the LUG
mailing list