saeki’s blog

The limits of my code mean the limits of my world.

Linux

ファイルの内容をgrepして行を絞り込む

Apacheのログを調べる必要があったのでメモ。 賢い人はFluentdやElasticsearchやKibanaを使ってます。使いたい。 $ grep -i <検索文字> <ファイル名> | cat $ grep -i "get /***" /var/log/httpd/access_log | cat -iオプションがあると大文字小文字を区別し…

Ubuntuでシステム日時を変更する

webサービスをテストするときに行ったオペレーション覚え書き 現在日時確認 $ date Wed Sep 13 05:03:32 UTC 2017 変更 $ date -s "09/30 18:00 2017" Sat Sep 30 18:00:02 UTC 2017 # 2017年9月30日18:00 にセット 変更確認 $ date Sat Sep 30 18:00:02 UTC…

Ubuntuでインストール済みのパッケージを確認する

ぜんぶ出す $ dpkg -l 特定のパッケージだけ確認 $ dpkg -l | grep mysql