
使用rpm -qlp
我可以獲得RPM包的內容。如何從 RPM 套件中查看以下腳本? (使用說cat
,,more
或vi
)
我想從 RPM 套件中列印以下腳本(在我的 Linux 機器上):
/home/Progect_ws/Progect/UFE_Install.sh
/home/Progect_ws/DB_client/UFE_Install.sh
#rpm -qlp CBS_Progect_WS-30_12.i386.rpm /home/Progect_ws/Progect /home/Progect_ws/Progect/Comverse-One-Progect-DROP1_3.5.50_TC10-Internal.zip /home/Progect_ws/Progect/Configure_Progect.properties /home/Progect_ws/Progect/UFE_Install.sh /home/Progect_ws/DB_client /home/Progect_ws/DB_client/Comverse-One-CLIENT-DROP1_3.5.50_TC10-Internal.zip /home/Progect_ws/DB_client/Configure_client.properties /home/Progect_ws/DB_client/UFE_Install.sh
答案1
使用rpm2cpio
但要注意,它將 cpio 檔案傳送到標準輸出,因此您需要將其透過管道傳輸到 cpio 以提取檔案:
rpm2cpio CBS_Progect_WS-30_12.i386.rpm | cpio -idm