Server관련/Sever(OS)

[Unix명령] head + HEAD command

saltdoll 2008. 1. 11. 15:18
반응형
head는 원래 파일의 앞 부분의 10라인을 읽어주는 컨솔 명령어 입니다.
head -n 20 {파일명}을 입력하면, 20라인까지 읽어오게 됩니다. 

출처 : http://www.computerhope.com/unix/uhead.htm


Linux / Unix head command
About head
: Displays the first ten lines of a file, unless otherwise stated.
Syntax : head [-number | -n number] filename
-number The number of the you want to display.
-n number The number of the you want to display.
filename The file that you want to display the x amount of lines of.

Examples:
head -15 myfile.txt - Would display the first fifteen lines of myfile.txt.



HEAD명령으로 해당페이지의 HEAD메소드 request값을 가져온다.
Examples: HEAD nglog.namo.co.kr/djlee

-bash-3.1$ HEAD --help
Unknown option: help
Usage: HEAD [-options] <url>...
    -m <method>   use method for the request (default is 'HEAD')
    -f            make request even if HEAD believes method is illegal
    -b <base>     Use the specified URL as base
    -t <timeout>  Set timeout value
    -i <time>     Set the If-Modified-Since header on the request
    -c <conttype> use this content-type for POST, PUT, CHECKIN
    -a            Use text mode for content I/O
    -p <proxyurl> use this as a proxy
    -P            don't load proxy settings from environment
    -H <header>   send this HTTP header (you can specify several)

    -u            Display method and URL before any response
    -U            Display request headers (implies -u)
    -s            Display response status code
    -S            Display response status chain
    -e            Display response headers
    -d            Do not display content
    -o <format>   Process HTML content in various ways

    -v            Show program version
    -h            Print this message

    -x            Extra debugging output
-bash-3.1$

반응형
도움이 되셨다면 하트모양의 "♡ 공감"을 눌러주시면 큰 격려가 됩니다.
(로그인하지 않으셔도 가능)