DOMDOM
0posts
today
total
personal posts · since 2021

Fragments
of a day.

A small notebook for slow moments slipping by.

2023 IT Creator
2024 Food Creator
2025 News Creator
2026 News Creator

Latest Posts최근

tistory view

Back to Home

cat 명령어로 실시간 로그 확인하기

728x90
반응형

cat 명령어로 실시간 로그 확인하기

 

1. cat 명령어로 로그파일이 변경되는 내용을 계속 보고 싶다면

tail -f file.log



2. cat 명령어로 마지막 100줄을 보려면 tail 명령어를 사용하면 됩니다.

tail -n 100 file.log



3. 로그의 마지막 100줄만 파일로 저장하려면

tail -n 100 file.log > last_100_lines.txt



4. 기존파일에 추가로 저장하려면 ( >> 사용 )

tail -n 100 file.log >> lasat_100_lines.txt




728x90
반응형

Comments

Thanks for staying up late.

keep wandering · keep listening