Created
December 3, 2017 13:44
-
-
Save liyang85/6ca6d7ab88ad61a14bca79fd7dbcab14 to your computer and use it in GitHub Desktop.
must use rpm2cpio and cpio, or no other way can do this.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# find the target file in the package | |
rpm2cpio httpd-2.2.15-59.el6.centos.x86_64.rpm | cpio -tv | grep "init.d/httpd" | |
# view content of the target file then redirect it | |
rpm2cpio httpd-2.2.15-59.el6.centos.x86_64.rpm | cpio -i --to-stdout ./etc/rc.d/init.d/httpd > /etc/rc.d/init.d/httpd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment