Linux ETC

 

리눅스에서 wget 명령어의 사용 방법

 

[root@localhost ~]# wget <URL>

ex)

[root@Assarabia ~]# wget http://hostway.co.kr/manual/serverHosting_CentOS55.pdf

--2012-05-30 05:31:57--  http://hostway.co.kr/manual/serverHosting_CentOS55.pdf

Resolving hostway.co.kr... 64.23.65.236

Connecting to hostway.co.kr|64.23.65.236|:80... connected.

HTTP request sent, awaiting response... 200 OK

Length: 10845373 (10M) [application/pdf]

Saving to: `serverHosting_CentOS55.pdf'

100%[======================================>] 10,845,373  11.0M/s   in 0.9s

2012-05-30 05:31:58 (11.0 MB/s) - `serverHosting_CentOS55.pdf' saved [10845373/10845373]

 

위와 같이 간단히 사용 할 수 있습니다. 파일명 뒤에 saved 가 나왔다면, 정상적으로 파일이 전송되었다는 의미입니다.

 

명령 옵션

-o <파일 이름> : 로그 파일을 생성 합니다.

-c : 이어받기. , 서버가 이어받기를 지원 해야 합니다.

--http-user=<사용자ID> : 로그인이 필요한 경우 사용자 ID. '<' '>' 은 입력 하지 않습니다.

--http-password=<사용자 비밀번호> : 로그인이 필요한 경우 사용자의 비밀번호. '<' '>' 은 입력 하지 않습니다.

--passive-ftp : FTP 접근시 Passive Mode 사용.