최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday

티스토리 뷰

1. 기 능 

파일의 마지막 부분을 출력한다.

 

2. 문 법

tail  [option] ... [file] ...
기본 출력은 파일의 마지막 10줄을 보여준다.

 

3. 옵션

--bytes=N : Nbyte 만큼 출력한다.
-f : 파일의 10줄을 출력해주고 파일의 내용을 실시간으로 계속해서 출력한다.
-n N : n 개수만큼의 라인을 출력한다.

 

4. 사용방법 및 정보


 

[root@ls ]# tail -n 20 anaconda-ks.cfg

 

anaconda-ks.cfg 파일의 마지막부터 20줄까지를 출력한다. 

 

[root@ls ]# tail -n +20 anaconda-ks.cfg

 

anaconda-ks.cfg 파일의 20번째 줄 이후를 출력한다. 

 

[root@ls ]# tail -f /var/log/messages

 

/var/log/messages 파일을 실시간으로 화면에 출력한다(log 모니터링에 사용됨)

 

http://target2u.blogspot.kr/2007/01/tail.html

 

댓글