리눅스 head

Jmnote (토론 | 기여)님의 2020년 2월 9일 (일) 21:39 판
  다른 뜻에 대해서는 HTML head 태그 문서를 참조하십시오.
  다른 뜻에 대해서는 리눅스 head 문서를 참조하십시오.
  다른 뜻에 대해서는 R head() 문서를 참조하십시오.
리눅스 첫부분만 출력하기
head
/usr/bin/head

1 처음 10개행 보기

명령어
head 파일명
실행 예시
[root@zetawiki ~]# head /etc/services 
# /etc/services:
# $Id: services,v 1.42 2006/02/23 13:09:23 pknirsch Exp $
#
# Network services, Internet style
#
# Note that it is presently the policy of IANA to assign a single well-known
# port number for both TCP and UDP; hence, most entries here have two entries
# even if the protocol doesn't support UDP operations.
# Updated from RFC 1700, ``Assigned Numbers'' (October 1994).  Not all ports
# are included, only the more common ones.

2 처음 n개행 보기

명령어
head -행수 파일명
head -n행수 파일명
head 파일명 -n행수
cat 파일명 | head -행수
cat 파일명 | head -n행수
실행예시
[root@zetawiki ~]# head -2 /etc/services
# /etc/services:
# $Id: services,v 1.42 2006/02/23 13:09:23 pknirsch Exp $
[root@zetawiki ~]# head /etc/services -n2
# /etc/services:
# $Id: services,v 1.42 2006/02/23 13:09:23 pknirsch Exp $

3 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}