- 다른 뜻에 대해서는 컬 문서를 참조하십시오.
1 개요[ | ]
- cURL, curl, libcurl
- /usr/bin/curl
- 컬 [kəːrl]</nowiki>, 씨 URL[1]
- 다양한 프로토콜로 데이터를 전송하는 라이브러리, 명령줄 도구, 그 프로젝트
- 원격서버(FTP, HTTP 등)에서 파일 받아 보여주는 도구[2]
2 실행예시 1: 기본[ | ]
Console
Copy
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&ei=VqoMV46DJNLU8Ae7xouoBw">here</A>.
</BODY></HTML>
3 실행예시 2: 헤더정보 보기 -I[ | ]
curl 헤더정보 보기 문서를 참고하십시오.
Console
Copy
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[ | ]
curl -i 문서를 참고하십시오.
Console
Copy
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&ei=gqoMV9mPLczU8AefxoxA">here</A>.
</BODY></HTML>
5 주요 옵션[ | ]
옵션 | 설명 |
---|---|
-H, --header | 헤더를 보냄 |
-i, --include | Include protocol headers in the output (H/F) |
-I, --head | Show document info only |
-k, --insecure | Allow connections to SSL sites without certs (H) |
-s, --silent | 진행 상태, 에러 메시지등을 보여주지 않음 |
-S, --show-error | -s와 함께 사용되며 실패 시 에러메시지 출력 |
-L, --location | 요청페이지가 다른 위치로 옮겨 졌을 경우 새로운 페이지로 다시 재요청 |
-X, --request | HTTP 메소드를 설정 할 수 있음 |
6 같이 보기[ | ]
- 우분투 curl 설치
- curl 헤더정보 보기 -I, -i
- curl 기본 인증 통과
- curl 다이제스트 인증 통과
- curl 파일명 지정하여 다운로드
- curl로 파일 다운로드하기 -LO
- 리눅스 wget
- ab
- http-ping (윈도우)
- 리눅스 공인 IP 확인
- lynx
- libwww
- 함수 get_http_code()
- 윈도우 curl
7 참고[ | ]
- ↑ https://curl.haxx.se/docs/faq.html 'see URL', We pronounce curl with an initial k sound. It rhymes with words like girl and earl. This is a short WAV file to help you: https://media.merriam-webster.com/soundc11/c/curl0001.wav
- ↑ A utility for getting files from remote servers (FTP, HTTP, and others)
편집자 Jmnote Jmnote bot
로그인하시면 댓글을 쓸 수 있습니다.
- 분류 댓글:
- 리눅스 네트워크 (5)
- /usr/bin (2)
리눅스 hosts 파일 ― 올해대박리눅스 hosts 파일 ― Jmnote리눅스 nc 포트 열기 ― …우분투 절전모드 해제시 와이파이 안되는 문제 ― D4RT우분투 절전모드 해제시 와이파이 안되는 문제 ― Beyondthelimit