[CENTOS] How to check / extract files in RPM package

Use scene

Execution command

--rpm2cpio = Command to convert to cpio file --cpio = Command to operate archive files

-[--list] = List display -[-i] = Extract (receive archive file from standard input and extract: copy-in mode) -[-d] = Create directory (automatically created if the required directory does not exist during extraction)

Execution example 1: When you want to check what kind of files exist in the rpm package

[root@hogehoge ~]# rpm2cpio google-noto-sans-georgian-fonts-20141117-5.el7.noarch.rpm | cpio --list
./etc/fonts/conf.d/66-google-noto-sans-georgian.conf
./usr/share/appdata/google-noto-sans-georgian.metainfo.xml
./usr/share/fontconfig/conf.avail/66-google-noto-sans-georgian.conf
./usr/share/fonts/google-noto
./usr/share/fonts/google-noto/NotoSansGeorgian-Bold.ttf
./usr/share/fonts/google-noto/NotoSansGeorgian-Regular.ttf
124 blocks
[root@hogehoge ~]# 

Execution example 2: When you want to extract the files in the rpm package without installing them

[root@hogehoge ~]# rpm2cpio google-noto-sans-georgian-fonts-20141117-5.el7.noarch.rpm | cpio -id
124 blocks
[root@hogehoge ~]# 
[root@hogehoge ~]# ls -l
 drwxr-xr-x 3 root root 19 May 2 18:20 usr
 drwxr-xr-x 3 root root 19 May 2 18:20 etc
[root@hogehoge ~]#

Recommended Posts

How to check / extract files in RPM package
How to extract polygon area in Python
How to check opencv version in python
How to read CSV files in Pandas
Summary of how to import files in Python 3
How to get the files in the [Python] folder
How to load files in Google Drive with Google Colaboratory
How to use variables in systemd Unit definition files
How to download files from Selenium in Python in Chrome
How to add page numbers to PDF files (in Python)
How to upload files in Django generic class view
How to reference static files in a Django project
How to develop in Python
[python] How to check if the Key exists in the dictionary
How to extract any appointment in Google Calendar with Python
How to check ORM behavior in one file with django
How to check if a value exists in an enum
Summary of how to write .proto files used in gRPC
[Python] How to do PCA in Python
How to handle session in SQLAlchemy
How to use classes in Theano
How to collect images in Python
How to update Spyder in Anaconda
How to use SQLite in Python
How to create a Conda package
How to convert 0.5 to 1056964608 in one shot
How to use Nix package manager
How to reflect CSS in Django
How to kill processes in bulk
How to use Mysql in python
How to wrap C in Python
How to use ChemSpider in Python
How to use PubChem in Python
Bring files in Windows to WSL
How to check Linux OS version
How to run TensorFlow 1.0 code in 2.0
How to handle Japanese in Python
How to log in to Docker + NGINX
How to call PyTorch in Julia
Extract strings from files in Python
How to display a specified column of files in Linux (awk)
How to check the memory size of a variable in Python
How to use functions in separate files Perl and Python versions
How to check the memory size of a dictionary in Python
[TensorFlow 2] How to check the contents of Tensor in graph mode
How to use calculated columns in CASTable
[Linux] How to subdivide files and folders
How to package and distribute Python scripts
[Introduction to Python] How to use class in Python?
How to suppress display error in matplotlib
How to access environment variables in Python
How to check local GAE from iPhone browser in the same LAN
How to dynamically define variables in Python
How to add a package with PyCharm
How to do R chartr () in Python
How to check the version of Django
How to create * .spec files for pyinstaller.
How to convert csv to tsv in CLI
How to delete expired sessions in Django
[Itertools.permutations] How to put permutations in Python
How to use Google Test in C