Posted in Linux/Unix/BSD -
I very occasionally need to support people with websites on servers other than those I manage. If the server is only accessible using FTP and I need to get a copy of the entire website, then I use the ncftpget command line tool to recursively download all the files and directories in one go.
ncftpget is part of the ncftp package.
On APT based Linux distros (e.g. Debian) you can install it like this:
apt-get install ncftp
On YUM based Linux distros (e.g. CentOS, RHEL) you can install it like this:
yum install ncftp
Use the command like so:
ncftpget -R -T -v -u [username] [hostname] [local path] [remote path]
-R tells ncftpget to download files and directories recursively
-T says not to try a tar download (it's never worked for me and results in the error "tar: This does not look like a tar archive" and "tar: Exiting with failure status due to previous errors". The actual files subsequently download just fine).
-v says to be verbose and show the download progress; you can omit this but it can be useful to see what's going on
-u specifies the username to use. Change [username] to the user to log in as
Replace [hostname] with the server to ftp to.
Replace [local path] to where you want to copy the files to.
Replace [remote path] to the path where the files are on the server you are connecting to.
Let's say our username is "chris", the server is 10.1.1.10, the path we want to save to locally is /tmp and we want to download files from the remote host from /httpdocs. Do this:
ncftpget -R -T -v -u chris 10.1.1.10 /tmp /httpdocs
You are then prompted for the password and the download starts.
제목 | 날짜 | ||
---|---|---|---|
347 | 구글 어플리케이션으로 자신이 소유한 도메인의 메일주소 사용하기 | 6097 | 2007/10/03 |
346 | [웹로그] 내 블로그에 검색용 애드센스를 삽입하자 [1] [1] | 6118 | 2007/11/22 |
345 | [웹로그] 구글 애드센스 주의할 점 [3] | 6142 | 2007/11/05 |
344 | [웹로그] 내 티스토리에 인기글 목록을 달아보자 | 6152 | 2007/11/08 |
343 | [기본] 우리지역 도서관 이용해보자. | 6186 | 2007/10/07 |
342 | [웹로그] Windows 고전(흑) 테마 | 6194 | 2007/11/20 |
341 | [기본] 카스퍼스키 안티 바이러스 7, 3개월 무료 이용권 (처음 사용자용) | 6199 | 2007/12/01 |
340 | [웹로그] 내 파이어폭스 북마크를 다른 컴퓨터에서도 사용하자 | 6215 | 2007/10/28 |
339 | [기본] 작업관리자에서 필요없는 실행프로세서를 죽이자. | 6230 | 2007/10/28 |
338 | [기본] ncloudblog님의 스킨 날짜 부분 따라하기 | 6237 | 2007/11/21 |
337 | [웹로그] 이온디 웹디벨로퍼 | 6250 | 2009/11/15 |
336 | [기본] [프로디지 7.1 LT][참고] 다이렉트와이어 설정방법 및 NSP 활용방법 (초보용) | 6256 | 2007/10/29 |