리눅스 curl

Jmnote (토론 | 기여)님의 2016년 4월 12일 (화) 17:04 판

1 개요

cURL, curl, libcurl
/usr/bin/curl
  • 원격서버(FTP, HTTP 등)에서 파일 받아 보여주는 도구[1]

2 실행예시 1: 기본

  • curl 7
root@zetawiki:~# curl google.com
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="http://www.google.co.kr/?gfe_rd=cr&amp;ei=VqoMV46DJNLU8Ae7xouoBw">here</A>.
</BODY></HTML>

3 실행예시 2: 헤더정보 보기 -I

root@zetawiki:~# curl -I google.com
HTTP/1.1 302 Found
Cache-Control: private
Content-Type: text/html; charset=UTF-8
Location: http://www.google.co.kr/?gfe_rd=cr&ei=NKoMV5TZCILD8AfCsqToCw
Content-Length: 261
Date: Tue, 12 Apr 2016 07:56:36 GMT

4 실행예시 3: 헤더+본문 보기 -i

root@zetawiki:~# curl -i google.com
HTTP/1.1 302 Found
Cache-Control: private
Content-Type: text/html; charset=UTF-8
Location: http://www.google.co.kr/?gfe_rd=cr&ei=gqoMV9mPLczU8AefxoxA
Content-Length: 259
Date: Tue, 12 Apr 2016 07:57:54 GMT

<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="http://www.google.co.kr/?gfe_rd=cr&amp;ei=gqoMV9mPLczU8AefxoxA">here</A>.
</BODY></HTML>

5 같이 보기

6 주석

  1. A utility for getting files from remote servers (FTP, HTTP, and others)

7 참고 자료

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