Skip to content

Instantly share code, notes, and snippets.

@yoshikaw
Created April 7, 2011 03:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yoshikaw/907009 to your computer and use it in GitHub Desktop.
Save yoshikaw/907009 to your computer and use it in GitHub Desktop.
ISOファイルからお目当てのrpmファイルをisoinfoコマンドで探す
% find /path/to/many/iso -type f -exec isoinfo -Jf -i {} \; | grep need-rpm
% find /path/to/many/iso -type f | while read iso; do echo "[$iso]"; isoinfo -Jf -i $iso | grep need-rpm; done
# 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