大きなログの確認。
cat dev.log | grep #12345 | grep ERROR cat dev.log | grep #12345 | grep ERROR > out.txt
ファイルを空にする。
echo '' > dev.log
tail
# 最後の10行のみ tail dev.log # 行数指定、nオプション tail -n 20 dev.txt # fオプション指定、リアル監視(ctrl+cで停止) tail -f dev.log # grepと合わせて、対象抽出のリアル監視 tail -f dev.log | grep ERROR