Last active
June 20, 2024 11:50
-
-
Save dogukancagatay/22ea7ca1af709e73a3bd5ac746fe7880 to your computer and use it in GitHub Desktop.
Extract contents of RPM file
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
#!/usr/bin/env bash | |
# Reference: https://stackoverflow.com/questions/18787375/how-do-i-extract-the-contents-of-an-rpm | |
# cpio flags | |
# -i = extract | |
# -d = make directories | |
# -m = preserve modification time | |
# -v = verbose | |
mkdir contents; cd contents | |
rpm2cpio ../*.rpm | cpio -idmv | |
# RHEL 9 | |
# rpm2cpio ../*.rpm | zstd -d | cpio -idmv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment