OS/RHEL7

rpm 패키지 압축 풀기

zzerog 2021. 7. 6. 23:18
728x90
  • rpm 파일을 설치하지 않고 내부에 포함된 파일만 확인할때 사용

# rpm2cpio telegraf-1.18.3-1.x86_64.rpm | cpio -idv

[root@centos7 ~]# cd test
[root@centos7 test]# ls
telegraf-1.18.3-1.x86_64.rpm

[root@centos7 test]# rpm2cpio telegraf-1.18.3-1.x86_64.rpm | cpio -idv
./etc/logrotate.d/telegraf
./etc/telegraf/telegraf.conf
./etc/telegraf/telegraf.d
./usr/bin/telegraf
./usr/lib/telegraf/scripts/init.sh
./usr/lib/telegraf/scripts/telegraf.service
./var/log/telegraf
210566 blocks

[root@centos7 test]# ls
etc  telegraf-1.18.3-1.x86_64.rpm  usr  var

[root@centos7 test]# tree
.
├── etc
│   ├── logrotate.d
│   │   └── telegraf
│   └── telegraf
│       ├── telegraf.conf
│       └── telegraf.d
├── telegraf-1.18.3-1.x86_64.rpm
├── usr
│   ├── bin
│   │   └── telegraf
│   └── lib
│       └── telegraf
│           └── scripts
│               ├── init.sh
│               └── telegraf.service
└── var
    └── log
        └── telegraf

12 directories, 6 files
반응형