Linux/Unix Log path and search

Linux and Unix log path is very seam.

If you have some prablem on linux or unix, you need to check log.

log default path is /var/log, And you can see below folder.

boot Boot log. (dmesg)
maillog mail log.
messages mail and news log of all.
secure user access log.
dmesg Boot log, it’s seam to boot.
cron cron관련 예약 작업 메세지 입니다.
wtmp user connect information log.
xferlog FTP server data send log.

you can use command like this.

boot.log contains ?
grep [search string] [file name]

grep “?” /var/logs/boot.log

boot.log  contains ? and 08/Feb 
grep [search string] [file name] | grep [2nd search string]
grep “?” /var/logs/boot.log | grep “08/Feb”

boot.log contains ? and 08/Feb and not contains Vmware
grep [search string] [file name] | grep [2nd search string] | grep -v [search string]
grep “?” /var/logs/boot.log| grep “07/Feb” | grep -v “Vmware”

Facebook Comments

Leave A Reply

이메일은 공개되지 않습니다. 필수 입력창은 * 로 표시되어 있습니다

This site uses Akismet to reduce spam. Learn how your comment data is processed.