[lug] cpio

Bear Giles bgiles at coyotesong.com
Mon Apr 7 18:38:42 MDT 2003


Robert wrote:
> I'm using this syntax:
> 
> find -name $TARGET -print | cpio -oAO $ARCHIVE_FILE
> 
> I thought the syntax was correct, but apparently not, as I receive this
> error"
> 
> "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.

Bear




More information about the LUG mailing list