Why does rpm2cpio pipelined command fail with error "xz stdin File format not recognized" in Red Hat Enterprise Linux 7?

Solution Verified - Updated -

Issue

  • The following command works as expected in Red Hat Enterprise Linux 5 whereas it doesn't work in Red Hat Enterprise Linux 7.
[root@rhel5u7 ~]# rpm2cpio eap7-wildfly-7.0.4-4.GA_redhat_2.1.ep7.el6.noarch.rpm | xz -d | cpio -ivd '*standalone*.xml' '*.properties'
./etc/opt/rh/eap7/wildfly/appclient/logging.properties
./etc/opt/rh/eap7/wildfly/domain/application-roles.properties
./etc/opt/rh/eap7/wildfly/domain/application-users.properties
./etc/opt/rh/eap7/wildfly/domain/default-server-logging.properties
./etc/opt/rh/eap7/wildfly/domain/logging.properties
./etc/opt/rh/eap7/wildfly/domain/mgmt-groups.properties
./etc/opt/rh/eap7/wildfly/domain/mgmt-users.properties
./etc/opt/rh/eap7/wildfly/standalone/application-roles.properties
./etc/opt/rh/eap7/wildfly/standalone/application-users.properties
./etc/opt/rh/eap7/wildfly/standalone/logging.properties
./etc/opt/rh/eap7/wildfly/standalone/mgmt-groups.properties
./etc/opt/rh/eap7/wildfly/standalone/mgmt-users.properties
./etc/opt/rh/eap7/wildfly/standalone/standalone-full-ha.xml
./etc/opt/rh/eap7/wildfly/standalone/standalone-full.xml
./etc/opt/rh/eap7/wildfly/standalone/standalone-ha.xml
./etc/opt/rh/eap7/wildfly/standalone/standalone.xml
./opt/rh/eap7/root/usr/share/doc/wildfly/examples/configs/standalone-azure-full-ha.xml
./opt/rh/eap7/root/usr/share/doc/wildfly/examples/configs/standalone-azure-ha.xml
./opt/rh/eap7/root/usr/share/doc/wildfly/examples/configs/standalone-ec2-full-ha.xml
./opt/rh/eap7/root/usr/share/doc/wildfly/examples/configs/standalone-ec2-ha.xml
./opt/rh/eap7/root/usr/share/doc/wildfly/examples/configs/standalone-genericjms.xml
./opt/rh/eap7/root/usr/share/doc/wildfly/examples/configs/standalone-gossip-full-ha.xml
./opt/rh/eap7/root/usr/share/doc/wildfly/examples/configs/standalone-gossip-ha.xml
./opt/rh/eap7/root/usr/share/doc/wildfly/examples/configs/standalone-jts.xml
./opt/rh/eap7/root/usr/share/doc/wildfly/examples/configs/standalone-minimalistic.xml
./opt/rh/eap7/root/usr/share/doc/wildfly/examples/configs/standalone-picketlink.xml
./opt/rh/eap7/root/usr/share/doc/wildfly/examples/configs/standalone-rts.xml
./opt/rh/eap7/root/usr/share/doc/wildfly/examples/configs/standalone-xts.xml
./opt/rh/eap7/root/usr/share/wildfly/bin/add-user.properties
./opt/rh/eap7/root/usr/share/wildfly/bin/jboss-cli-logging.properties
21983 blocks
  • For Red Hat Enterprise Linux 7
# rpm2cpio eap7-wildfly-7.0.4-4.GA_redhat_2.1.ep7.el6.noarch.rpm | xz -d | cpio -ivd '*standalone*.xml' '*.properties'
xz: (stdin): File format not recognized
cpio: premature end of archive

Environment

  • Red Hat Enterprise Linux 5/7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content