LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   cpio sco v linux (https://www.linuxquestions.org/questions/linux-newbie-8/cpio-sco-v-linux-4175557476/)

brian_a 10-29-2015 10:48 AM

cpio sco v linux
 
backup file created on sco unix v 5.07 try to extract in red Linux 6.5
gives an error "cpio: premature end of file"

is there a switch for cpio I can use ?

when I type " file cpiofilename " it returns ASCII cpio archive (pre-SVR4 or odc)

any help ?

berndbausch 10-30-2015 06:56 AM

Quote:

Originally Posted by brian_a (Post 5441922)
backup file created on sco unix v 5.07 try to extract in red Linux 6.5
gives an error "cpio: premature end of file"

is there a switch for cpio I can use ?

Yes: http://linux.die.net/man/1/cpio
Quote:

when I type " file cpiofilename " it returns ASCII cpio archive (pre-SVR4 or odc)

any help ?
The help is in the output of the file command.

brian_a 10-30-2015 08:48 AM

thanks used Hodc on cpio and this worked

ruario 12-04-2015 12:39 AM

I see this is resolved but I think it is worth mentioning a potential issue, in case you encounter problems in the future (an associate of mine encountered a similar issue a few years back).

Be aware that SCO made some extensions to CPIO to support very large files (up to 9EB), that it will invoke if individual members are greater than the limits of odc. GNU cpio and BSD cpio do not understand these extensions. However, the The Heirloom Toolchest cpio and pax utilities do.

If you have a suitable build environment, you can compile up a copy of Heirloom CPIO as follows:

Code:

wget http://downloads.sourceforge.net/project/heirloom/heirloom/070715/heirloom-070715.tar.bz2
tar xf heirloom-070715.tar.bz2
cd heirloom-070715
sed -i 's/^SUBDIRS/X/;2 a SUBDIRS = build libcommon libuxre cpio' makefile
make makefiles && make -C libcommon && make -C libuxre && make -C cpio
strip --strip-unneeded cpio/cpio

You can then copy "cpio/cpio" (the executable) to a suitable location. Perhaps '/usr/local/bin/heirloom-cpio' ?

You should also read the man page for Heirloom cpio. It contains a lot of information about the various cpio and tar formats (their differences and their capabilities) as well as explaining how this version of cpio works. There is also a local copy in the package (cpio/cpio.1) if you prefer, which you could copy to '/usr/local/man/man1/heirloom-cpio.1'.

Note: To explicitly specify the SCO extended format, you can use "-H sco".


All times are GMT -5. The time now is 02:29 PM.