日別アーカイブ: 2011年2月27日

基本コマンド2

grep
grep 検索語 検索ファイル
検索ファイル中の検索語を含む行を表示する。

grep hoge.com /var/log/httpd/*
cat /var/log/access*|grep hoge.com
のように、他から流し込むこともできる。

df
ディスクの空き状況を表示する。

free
メモリの空き状況を表示する。

wc
行数を知る。
grep error error_log|wc
みたいに繋ぐと、該当語がある行数を簡単に調べたり出来る

(85)

カテゴリー: LAMP[Linux, Apache, MySQL, PHP] | コメントをどうぞ