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.
제목 | 날짜 | ||
---|---|---|---|
395 | [윈도우] 게시자가 차단되어서 사용자의 | 12594 | 2009/01/13 |
394 | [사이트관리] www 로 접속하면 떼고 접속하기 [1] | 11461 | 2009/01/13 |
393 | [X61] 녹음하기 | 8934 | 2009/01/14 |
392 | [워드프로세서] 똑같은 문서를 그 아래 복사한 뒤 계속 문서 작업하는 방법 | 9030 | 2009/01/18 |
391 | [기타] 영남대학교 자유게시판 RSS | 11539 | 2009/01/21 |
390 | [미디어/녹음·재생] 오디오트랙 프로디지 7.1 LT 윈도우 내부재생음 녹음하기 | 9984 | 2009/01/23 |
389 | [네트워크] JazzMultiPC 마우스 하나로 컴퓨터 두 대를 | 11694 | 2009/01/28 |
388 | [데스크탑/액세서리] 아토 설정팁 브라우저에서 Alt+Left로 뒤로가기가 안된다면? | 9246 | 2009/02/08 |
387 | [텔넷] FTP 비밀번호 변경 | 13131 | 2009/02/11 |
386 | [하드웨어] 비스타 가젯 사용하기 | 7096 | 2009/03/13 |
385 | [X61] 빨콩 드라이버 업데이트 | 12107 | 2009/03/13 |
384 | [웹로그] 마이노트 제작후기 [1] | 7251 | 2009/03/14 |