Created
April 7, 2011 03:57
-
-
Save yoshikaw/907009 to your computer and use it in GitHub Desktop.
ISOファイルからお目当てのrpmファイルをisoinfoコマンドで探す
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% find /path/to/many/iso -type f -exec isoinfo -Jf -i {} \; | grep need-rpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% find /path/to/many/iso -type f | while read iso; do echo "[$iso]"; isoinfo -Jf -i $iso | grep need-rpm; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# isoファイルとautomountのパスをそろえておくとこんな感じでより便利かも。(snmpパッケージを検索したときの例) | |
% find /iso/OS/RedHat/RHEL4-U3/x86_64 -type f | while read iso; do n=${iso##*disc}; isoinfo -Jf -i $iso | grep -i snmp | xargs -rn 1 echo /mnt${iso%/*}/disc${n%%.*} | tr -d ' '; done | xargs -r ls -l | |
-rw-r--r-- 505 root root 504378 9月 20 2005 /mnt/iso/OS/RedHat/RHEL4-U3/x86_64/disc2/RedHat/RPMS/net-snmp-5.1.2-11.EL4.6.x86_64.rpm | |
-rw-r--r-- 1209 root root 1747590 9月 20 2005 /mnt/iso/OS/RedHat/RHEL4-U3/x86_64/disc2/RedHat/RPMS/net-snmp-libs-5.1.2-11.EL4.6.i386.rpm | |
-rw-r--r-- 528 root root 1872035 9月 20 2005 /mnt/iso/OS/RedHat/RHEL4-U3/x86_64/disc2/RedHat/RPMS/net-snmp-libs-5.1.2-11.EL4.6.x86_64.rpm | |
-rw-r--r-- 528 root root 164012 9月 20 2005 /mnt/iso/OS/RedHat/RHEL4-U3/x86_64/disc4/RedHat/RPMS/net-snmp-utils-5.1.2-11.EL4.6.x86_64.rpm | |
-rw-r--r-- 505 root root 235034 9月 20 2005 /mnt/iso/OS/RedHat/RHEL4-U3/x86_64/disc5/RedHat/RPMS/net-snmp-devel-5.1.2-11.EL4.6.x86_64.rpm | |
-rw-r--r-- 505 root root 163876 9月 20 2005 /mnt/iso/OS/RedHat/RHEL4-U3/x86_64/disc5/RedHat/RPMS/net-snmp-perl-5.1.2-11.EL4.6.x86_64.rpm | |
-rw-r--r-- 482 root root 27362 11月 10 2005 /mnt/iso/OS/RedHat/RHEL4-U3/x86_64/disc5/RedHat/RPMS/php-snmp-4.3.9-3.9.x86_64.rpm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment