LoginSignup
11
18

More than 5 years have passed since last update.

rpmパッケージからファイルを取り出す

Last updated at Posted at 2015-10-02

とりあえず全部取り出す

$ rpm2cpio hoge.rpm | cpio -id  

ファイルを指定して取り出す

まず一覧表示

$ rpm2cpio hoge.rpm | cpio -t
./etc/hoge.txt
./etc/data/file1
./etc/data/file2
./etc/data/file3

取りたいファイルを引数に指定

$ rpm2cpio hoge.rpm | cpio -id  ./etc/hoge.txt 

ディレクトリを指定して取り出す

取りたいディレクトリを引数に指定。アスタリスクつける

$ rpm2cpio hoge.rpm | cpio -id  ./etc/data/*
11
18
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
18