読者です 読者をやめる 読者になる 読者になる

teTeXでパッケージがインストール済みか調べる

TeX

*NIXのコマンドライン文化に慣れようと試行錯誤。
とりあえずTeXのパッケージがインストール済みなのかどうなのか調べるためのコマンドを書いてみた。

$ grep -rn hogehoge-pack /usr/local/teTeX/share/texmf-*/ls-R

pst-**を探すときはこんな感じで。

$ grep -rn pst- /usr/local/teTeX/share/texmf-*/ls-R
/usr/local/teTeX/share/texmf-dist/ls-R:697:README.pst-3dplot
/usr/local/teTeX/share/texmf-dist/ls-R:698:README.pst-blur
/usr/local/teTeX/share/texmf-dist/ls-R:699:README.pst-circ
/usr/local/teTeX/share/texmf-dist/ls-R:700:README.pst-ghsb
/usr/local/teTeX/share/texmf-dist/ls-R:701:README.pst-gr3d
/usr/local/teTeX/share/texmf-dist/ls-R:702:README.pst-key
/usr/local/teTeX/share/texmf-dist/ls-R:703:README.pst-lens
/usr/local/teTeX/share/texmf-dist/ls-R:704:README.pst-osci
/usr/local/teTeX/share/texmf-dist/ls-R:705:README.pst-poly
/usr/local/teTeX/share/texmf-dist/ls-R:706:README.pst-slpe
/usr/local/teTeX/share/texmf-dist/ls-R:707:README.pst-uml
/usr/local/teTeX/share/texmf-dist/ls-R:708:README.pst-vue3d
/usr/local/teTeX/share/texmf-dist/ls-R:717:pst-3dplot-doc.pdf
/usr/local/teTeX/share/texmf-dist/ls-R:718:pst-blur.pdf
/usr/local/teTeX/share/texmf-dist/ls-R:719:pst-circ-doc.pdf
/usr/local/teTeX/share/texmf-dist/ls-R:720:pst-fill-doc.pdf
/usr/local/teTeX/share/texmf-dist/ls-R:721:pst-fill-doc.tex
/usr/local/teTeX/share/texmf-dist/ls-R:722:pst-gr3d.pdf
/usr/local/teTeX/share/texmf-dist/ls-R:723:pst-lens.pdf
/usr/local/teTeX/share/texmf-dist/ls-R:724:pst-math.pdf
/usr/local/teTeX/share/texmf-dist/ls-R:725:pst-osci.pdf
/usr/local/teTeX/share/texmf-dist/ls-R:726:pst-poly.pdf
/usr/local/teTeX/share/texmf-dist/ls-R:727:pst-slpe.pdf
/usr/local/teTeX/share/texmf-dist/ls-R:728:pst-uml-doc.pdf
/usr/local/teTeX/share/texmf-dist/ls-R:847:pst-doc.err
/usr/local/teTeX/share/texmf-dist/ls-R:848:pst-quik.ps
/usr/local/teTeX/share/texmf-dist/ls-R:849:pst-usr1.ps
/usr/local/teTeX/share/texmf-dist/ls-R:850:pst-usr2.ps
/usr/local/teTeX/share/texmf-dist/ls-R:851:pst-usr3.ps
/usr/local/teTeX/share/texmf-dist/ls-R:852:pst-usr4.ps
/usr/local/teTeX/share/texmf-dist/ls-R:941:pst-xkey.dvi
/usr/local/teTeX/share/texmf-dist/ls-R:2399:pst-3dplot.html
/usr/local/teTeX/share/texmf-dist/ls-R:2400:pst-bar.html
/usr/local/teTeX/share/texmf-dist/ls-R:2401:pst-blur.html
/usr/local/teTeX/share/texmf-dist/ls-R:2402:pst-circ.html
/usr/local/teTeX/share/texmf-dist/ls-R:2403:pst-fr3d.html
/usr/local/teTeX/share/texmf-dist/ls-R:2404:pst-func.html
/usr/local/teTeX/share/texmf-dist/ls-R:2405:pst-geo.html
/usr/local/teTeX/share/texmf-dist/ls-R:2406:pst-ghsb.html
/usr/local/teTeX/share/texmf-dist/ls-R:2407:pst-gr3d.html
/usr/local/teTeX/share/texmf-dist/ls-R:2408:pst-infixplot.html
/usr/local/teTeX/share/texmf-dist/ls-R:2409:pst-jftree.html
/usr/local/teTeX/share/texmf-dist/ls-R:2410:pst-lens.html
/usr/local/teTeX/share/texmf-dist/ls-R:2411:pst-light3d.html
/usr/local/teTeX/share/texmf-dist/ls-R:2412:pst-math.html
/usr/local/teTeX/share/texmf-dist/ls-R:2413:pst-node.html
/usr/local/teTeX/share/texmf-dist/ls-R:2414:pst-optic.html
/usr/local/teTeX/share/texmf-dist/ls-R:2415:pst-osci.html
/usr/local/teTeX/share/texmf-dist/ls-R:2416:pst-poly.html
/usr/local/teTeX/share/texmf-dist/ls-R:2417:pst-slpe.html
/usr/local/teTeX/share/texmf-dist/ls-R:2418:pst-uml.html
/usr/local/teTeX/share/texmf-dist/ls-R:2419:pst-vue3d.html
/usr/local/teTeX/share/texmf-dist/ls-R:2420:pst-xkey.html
/usr/local/teTeX/share/texmf-dist/ls-R:4756:pst-3dplot.pro
/usr/local/teTeX/share/texmf-dist/ls-R:4757:pst-blur.pro
/usr/local/teTeX/share/texmf-dist/ls-R:4758:pst-coil.pro
/usr/local/teTeX/share/texmf-dist/ls-R:4759:pst-dots.pro
/usr/local/teTeX/share/texmf-dist/ls-R:4760:pst-eqdf.pro
/usr/local/teTeX/share/texmf-dist/ls-R:4761:pst-ghsb.pro
/usr/local/teTeX/share/texmf-dist/ls-R:4762:pst-grad.pro
/usr/local/teTeX/share/texmf-dist/ls-R:4763:pst-math.pro
/usr/local/teTeX/share/texmf-dist/ls-R:4764:pst-node.pro
/usr/local/teTeX/share/texmf-dist/ls-R:4765:pst-slpe.pro
/usr/local/teTeX/share/texmf-dist/ls-R:4766:pst-text.pro
/usr/local/teTeX/share/texmf-dist/ls-R:14202:pst-3d.tex
/usr/local/teTeX/share/texmf-dist/ls-R:14203:pst-3dplot.tex
/usr/local/teTeX/share/texmf-dist/ls-R:14204:pst-blur.tex
/usr/local/teTeX/share/texmf-dist/ls-R:14205:pst-char.tex
/usr/local/teTeX/share/texmf-dist/ls-R:14206:pst-circ.tex
/usr/local/teTeX/share/texmf-dist/ls-R:14207:pst-coil.tex
/usr/local/teTeX/share/texmf-dist/ls-R:14208:pst-eps.tex
/usr/local/teTeX/share/texmf-dist/ls-R:14209:pst-fill.tex
/usr/local/teTeX/share/texmf-dist/ls-R:14210:pst-ghsb.tex
/usr/local/teTeX/share/texmf-dist/ls-R:14211:pst-gr3d.tex
/usr/local/teTeX/share/texmf-dist/ls-R:14212:pst-grad.tex
/usr/local/teTeX/share/texmf-dist/ls-R:14213:pst-key.tex
/usr/local/teTeX/share/texmf-dist/ls-R:14214:pst-lens.tex
/usr/local/teTeX/share/texmf-dist/ls-R:14215:pst-map2d.tex
/usr/local/teTeX/share/texmf-dist/ls-R:14216:pst-map2dII.tex
/usr/local/teTeX/share/texmf-dist/ls-R:14217:pst-map3d.tex
/usr/local/teTeX/share/texmf-dist/ls-R:14218:pst-map3dII.tex
/usr/local/teTeX/share/texmf-dist/ls-R:14219:pst-math.tex
/usr/local/teTeX/share/texmf-dist/ls-R:14220:pst-node.tex
/usr/local/teTeX/share/texmf-dist/ls-R:14221:pst-osci.tex
/usr/local/teTeX/share/texmf-dist/ls-R:14222:pst-plot.tex
/usr/local/teTeX/share/texmf-dist/ls-R:14223:pst-poly.tex
/usr/local/teTeX/share/texmf-dist/ls-R:14224:pst-slpe.tex
/usr/local/teTeX/share/texmf-dist/ls-R:14225:pst-text.tex
/usr/local/teTeX/share/texmf-dist/ls-R:14226:pst-tree.tex
/usr/local/teTeX/share/texmf-dist/ls-R:14227:pst-vue3d.tex
/usr/local/teTeX/share/texmf-dist/ls-R:14333:pst-xkey.tex
/usr/local/teTeX/share/texmf-dist/ls-R:16256:pst-3d.sty
/usr/local/teTeX/share/texmf-dist/ls-R:16257:pst-3dplot.sty
/usr/local/teTeX/share/texmf-dist/ls-R:16258:pst-all.sty
/usr/local/teTeX/share/texmf-dist/ls-R:16259:pst-blur.sty
/usr/local/teTeX/share/texmf-dist/ls-R:16260:pst-char.sty
/usr/local/teTeX/share/texmf-dist/ls-R:16261:pst-circ.sty
/usr/local/teTeX/share/texmf-dist/ls-R:16262:pst-coil.sty
/usr/local/teTeX/share/texmf-dist/ls-R:16263:pst-eps.sty
/usr/local/teTeX/share/texmf-dist/ls-R:16264:pst-fill.sty
/usr/local/teTeX/share/texmf-dist/ls-R:16265:pst-ghsb.sty
/usr/local/teTeX/share/texmf-dist/ls-R:16266:pst-gr3d.sty
/usr/local/teTeX/share/texmf-dist/ls-R:16267:pst-grad.sty
/usr/local/teTeX/share/texmf-dist/ls-R:16268:pst-key.sty
/usr/local/teTeX/share/texmf-dist/ls-R:16269:pst-lens.sty
/usr/local/teTeX/share/texmf-dist/ls-R:16270:pst-map2d.sty
/usr/local/teTeX/share/texmf-dist/ls-R:16271:pst-map2dII.sty
/usr/local/teTeX/share/texmf-dist/ls-R:16272:pst-map3d.sty
/usr/local/teTeX/share/texmf-dist/ls-R:16273:pst-map3dII.sty
/usr/local/teTeX/share/texmf-dist/ls-R:16274:pst-math.sty
/usr/local/teTeX/share/texmf-dist/ls-R:16275:pst-node.sty
/usr/local/teTeX/share/texmf-dist/ls-R:16276:pst-osci.sty
/usr/local/teTeX/share/texmf-dist/ls-R:16277:pst-plot.sty
/usr/local/teTeX/share/texmf-dist/ls-R:16278:pst-poly.sty
/usr/local/teTeX/share/texmf-dist/ls-R:16279:pst-slpe.sty
/usr/local/teTeX/share/texmf-dist/ls-R:16280:pst-text.sty
/usr/local/teTeX/share/texmf-dist/ls-R:16281:pst-tree.sty
/usr/local/teTeX/share/texmf-dist/ls-R:16282:pst-uml.sty
/usr/local/teTeX/share/texmf-dist/ls-R:16283:pst-vue3d.sty
/usr/local/teTeX/share/texmf-dist/ls-R:16640:pst-xkey.sty
/usr/local/teTeX/share/texmf-local/ls-R:19:pst-infixplot-doc.ps
/usr/local/teTeX/share/texmf-local/ls-R:20:pst-infixplot-doc.tex
/usr/local/teTeX/share/texmf-local/ls-R:34:pst-infixplot.pdf
/usr/local/teTeX/share/texmf-local/ls-R:35:pst-infixplot.tex
/usr/local/teTeX/share/texmf-local/ls-R:42:pst-infixplot.sty

grep便利ね。あとはどこのディレクトリにどのファイルがあるか分かるようにすると更に便利かな。

追記

他に同じような事やってる人いないかなとgoogle:"ls-R" grep texで検索してみたらこのページがトップに出てきてワロタw