"리눅스 head"의 두 판 사이의 차이

(새 문서: {{소문자}} {{테스트|CentOS 5.7}} *리눅스 파일 첫부분 보기 *head ==명령어== <source lang='dos'> head 파일명 </source> 파일에서 첫부분의 10개행을 보...)
 
잔글 (봇: 자동으로 텍스트 교체 (-source +syntaxhighlight))
 
(사용자 2명의 중간 판 27개는 보이지 않습니다)
1번째 줄: 1번째 줄:
{{소문자}}
{{다른뜻|HTML head 태그}}
{{다른뜻|리눅스 head}}
{{다른뜻|R head()}}
{{테스트|CentOS 5.7}}
{{테스트|CentOS 5.7}}
*리눅스 파일 첫부분 보기
;리눅스 첫부분만 출력하기
*head
;head
;/usr/bin/head


==명령어==
==처음 10개행 보기==
<source lang='dos'>
;명령어
<syntaxhighlight lang='bash'>
head 파일명
head 파일명
</source>
</syntaxhighlight>
파일에서 첫부분의 10개행을 보여준다.


==실행 예시==
;실행 예시
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@localhost ~]# head /etc/services  
[root@zetawiki ~]# head /etc/services  
# /etc/services:
# /etc/services:
# $Id: services,v 1.42 2006/02/23 13:09:23 pknirsch Exp $
# $Id: services,v 1.42 2006/02/23 13:09:23 pknirsch Exp $
23번째 줄: 26번째 줄:
# Updated from RFC 1700, ``Assigned Numbers'' (October 1994).  Not all ports
# Updated from RFC 1700, ``Assigned Numbers'' (October 1994).  Not all ports
# are included, only the more common ones.
# are included, only the more common ones.
</source>
</syntaxhighlight>
 
==처음 n개행 보기==
;명령어
<syntaxhighlight lang='bash'>
head -행수 파일명
head -n행수 파일명
head 파일명 -n행수
cat 파일명 | head -행수
cat 파일명 | head -n행수
</syntaxhighlight>
 
;실행예시
<syntaxhighlight lang='console'>
[root@zetawiki ~]# head -2 /etc/services
# /etc/services:
# $Id: services,v 1.42 2006/02/23 13:09:23 pknirsch Exp $
</syntaxhighlight>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# head /etc/services -n2
# /etc/services:
# $Id: services,v 1.42 2006/02/23 13:09:23 pknirsch Exp $
</syntaxhighlight>


==같이 보기==
==같이 보기==
*[[tail]]
*[[리눅스 head -c]]
*[[watch]]
*[[리눅스 tail]]
*[[리눅스 파일 N번째 행 보기]]
*[[리눅스 watch]]
*[[리눅스 cat]]
*[[윈도우 head]]


[[분류:리눅스]]
[[분류: 리눅스 필터]]
[[분류: /usr/bin]]

2020년 11월 2일 (월) 00:56 기준 최신판

  다른 뜻에 대해서는 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 }}