## 如果想解壓*.src.rpm格式的包,可以執行rpm2cpio命令。
如下所示,有個*.src.rpm文件:
[ root@localhost liusu]# ll
total 1164
-rw-r--r-- 1 root root 1188824 Nov 15 09:42 openstack-keystone-9.0.0-1.el7.src.rpm
執行rpm2cpio命令來解壓:
[ root@localhost liusu]# rpm2cpio openstack-keystone-9.0.0-1.el7.src.rpm |cpio -iv
keystone-9.0.0.tar.gz
keystone-dist.conf
openstack-keystone-sample-data
openstack-keystone.logrotate
openstack-keystone.service
openstack-keystone.spec
openstack-keystone.sysctl
2331 blocks
如下所示,加壓後得文件列表:
[ root@localhost liusu]# ll
total 2352
-rw-rw-r-- 1 root root 1181342 Nov 15 09:43 keystone-9.0.0.tar.gz
-rw-rw-r-- 1 root root 263 Nov 15 09:43 keystone-dist.conf
-rw-r--r-- 1 root root 1188824 Nov 15 09:42 openstack-keystone-9.0.0-1.el7.src.rpm
-rw-rw-r-- 1 root root 96 Nov 15 09:43 openstack-keystone.logrotate
-rwxrwxr-x 1 root root 53 Nov 15 09:43 openstack-keystone-sample-data
-rw-rw-r-- 1 root root 242 Nov 15 09:43 openstack-keystone.service
-rw-rw-r-- 1 root root 10122 Nov 15 09:43 openstack-keystone.spec
-rw-rw-r-- 1 root root 201 Nov 15 09:43 openstack-keystone.sysctl
## .tar.bz2
套件名稱:bzip2。
壓縮:
[ jonny@linux ~ ]
$ tar jcvf FileName.tar.bz2 DirName
解壓縮:
[ jonny@linux ~ ]
$ tar jxvf FileName.tar.bz2
沒有留言:
張貼留言