11
18

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?