2008-11-14
■ [CentOS][find][locate][which][whereis]いろいろな検索方法

ファイルを検索するのに一番早いのは、updatedbコマンドで作成したインデックスファイルを走査するlocateコマンドである。ただし複雑な正規表現はつかえずファイル名でしか検索が出来ない。これに対してfindはあまり早くないが多彩な検索が可能。速度だけなら、locateがgoogleデスクトップ並み、findが普通の検索。
whichならプログラムのみ(つまり実行ファイル属性)検索することができる。
# which httpd /usr/sbin/httpd
※2008/11/23訂正
whichはパスの通ったディレクトリ配下の実行ファイルを探すようである。なので、/etc/init.d/以下の実行ファイルは検索してくれない。
# which yum-cron /usr/bin/which: no yum-cron in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
whereisを使えば、実行ファイルのパス名やライブラリ、マニュアルの場所を検索できる。
# whereis httpd httpd: /usr/sbin/httpd /usr/sbin/httpd.worker /etc/httpd /usr/lib/httpd /usr/share/man/man8/httpd.8.gz
<a href="https://onlinecasino.gb.net/#">online casino real money</a>
<a href=" https://onlinecasino.gb.net/# ">online casino games</a>
<a href="https://onlinecasino.gb.net/#">best online casino</a>
<a href=" https://onlinecasino.gb.net/# ">online casino real money</a>
<a href="https://onlinecasino777.us.org/#">free online casino slots</a>
<a href=" https://onlinecasino777.us.org/# ">tropicana online casino</a>
<a href="https://onlinecasino777.us.org/#">huuuge casino slots</a>
<a href=" https://onlinecasino777.us.org/# ">free casino slots games</a>
<a href="https://onlinecasino777.us.org/#">online casino real money free</a>
<a href=" https://onlinecasino777.us.org/# ">playmgm nj casino online</a>
<a href="https://onlinecasino777.us.org/#">free casino games slot</a>
<a href=" https://onlinecasino777.us.org/# ">free vegas world casino games</a>