2021. 11. 11. 12:05

RPI 에서 GRC를 사용하여 로그를 쉽게 보는 방법.

336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

https://unix.stackexchange.com/questions/8414/how-to-have-tail-f-show-colored-output

 

How to have tail -f show colored output

I'd like to be able to tail the output of a server log file that has messages like: INFO SEVERE etc, and if it's SEVERE, show the line in red; if it's INFO, in green. What kind of alias can I se...

unix.stackexchange.com

안녕하세요. 
RPI 에서 Log를 볼때 콘솔에 색상을 입히면 좋을꺼 같다 생각했습니다.
그래서 찾다 보니 grc란게 있네요.

결과는 이와 같습니다.

watch를 사용 할 경우, 컬러 반영이 안되서 while do를 사용해야 되네요.

while sleep 60; do clear; sudo grc tail -n18 /var/log/nginx/error.log  /var/log/nginx/access.log /var/log/vsftpd.log ; done

감사합니다.