Skip to content

Instantly share code, notes, and snippets.

@realsby
Last active July 13, 2018 16:08
Show Gist options
  • Save realsby/4b5a20a8097adaa5e0843235a9e694b5 to your computer and use it in GitHub Desktop.
Save realsby/4b5a20a8097adaa5e0843235a9e694b5 to your computer and use it in GitHub Desktop.
Log arama ve yazdirma
Aşağıdaki kod text.file içinde belirli bir metini arar ve kaçıncı satırlarda yer aldığını basar.
grep -n Text_Metin text.file
Aşağıdaki kod text.file daki 6453 üncü satır ve öncesindeki 3 satırı (toplamda 4 satırı) basar.
head -n 6453 text.file | tail -n 4
Binrotada şunlara baktım:
grep -n MAL_ /var/log/uwsgi/binrota_pro.log
1463:MAL_LOG_KONTROL
2921:MAL_LOG_KONTROL
3131:MAL_LOG_KONTROL
3799:MAL_LOG_KONTROL
6868:MAL_LOG_KONTROL
7025:MAL_LOG_KONTROL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment