리눅스 head

  다른 뜻에 대해서는 HTML head 태그 문서를 참조하십시오.
  다른 뜻에 대해서는 리눅스 head 문서를 참조하십시오.
  다른 뜻에 대해서는 R head() 문서를 참조하십시오.
리눅스 첫부분만 출력하기
head
/usr/bin/head

1 처음 10개행 보기[ | ]

명령어
Bash
Copy
head 파일명
실행 예시
Console
Copy
[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개행 보기[ | ]

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

3 같이 보기[ | ]

  • 리눅스 디렉토리 용량 확인 du
    "현재폴더에 있는 폴더 및 파일 중에서 용량이 큰 것 순으로 10개 보기" 에서 -hs 옵션을 주면 sort가 제대로 되지 않는다고 하셨는데 sort의 -h 옵션을 이용하면 가능합니다. (-h, --human-numeric-sort) 저는 다음과 같이 합니다. du -hs * | so
  • 리눅스 반복 예약작업 cron, crond, crontab
    타사 크론 서비스를 사용하여 자신의 서버에서 호스팅 크론을 사용하여 게다가, 당신은 타사 크론 서비스 (보통이라고 webcron)를 사용할 수 있습니다 : http://EasyCron.com - 크론 작업을 설정하는 crontab을 또는 다른 작업 스케줄러의 필요성을 제거 webcron