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.
제목 | 날짜 | ||
---|---|---|---|
83 | [윈도우] 내 컴퓨터 드라이버 설치하기 | 11682 | 2009/01/11 |
82 | [네트워크] JazzMultiPC 마우스 하나로 컴퓨터 두 대를 | 11694 | 2009/01/28 |
81 | [윈도우] 컴퓨터 사용 도중 Runtime Library 오류가 뜰 때 | 11827 | 2004/11/22 |
80 | [모바일] remote for itunes [8] | 11831 | 2012/04/23 |
79 | [기본] 원노트에서 XE로 글 올리기 | 11906 | 2010/08/17 |
78 | [기본] RISS 원노트로 인쇄하기 | 11961 | 2010/05/26 |
77 | [사이트관리] 검색로봇 robot.txt 작성 [2] | 11971 | 2009/01/05 |
76 | [윈도우] 윈도우 설치 후 사용 준비 과정 | 11986 | 2009/01/11 |
75 | [기타] 네이버 카페 자료 백업을 위한 프로그램 - 까네 2.0 (GPL 라이센스 버전) | 12009 | 2007/09/17 |
74 | [텔넷] DB백업과 DB복구 | 12029 | 2004/05/06 |
73 | [웹로그] mysql 슬로우 쿼리 (Slow Query) 보기 [1] | 12037 | 2010/09/17 |
72 | [미디어/녹음·재생] 동영상 파일 자르기 [1] | 12063 | 2003/05/27 |