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.
제목 | 날짜 | ||
---|---|---|---|
119 | [브라우저] 오페라 브라우저 사용시 변경할 사항 | 10726 | 2008/07/31 |
118 | [기본] Aspire 5572ANWXCi 설치 드라이버 | 10756 | 2010/06/03 |
117 | [모바일] 반츄 키보드 | 10853 | 2012/05/02 |
116 | [기타] 지메일 알림, Gmail Notifier Plus | 10912 | 2010/11/16 |
115 | [기본] USB 보안 프로그램 | 10928 | 2010/05/02 |
114 | [윈도우] Windows 사용자(Users), Program Files, Program Files (x86) 폴더 D드라이브로 이동시키기 [1] | 10930 | 2013/06/22 |
113 | [기타] 주변기기 > 프린터 > hp Deskjet 600k | 10941 | 2005/03/04 |
112 | [하드웨어] 노트북 키맵핑 | 10952 | 2009/12/17 |
111 | [X61] 빨콩이 저절로 움직인다 | 10952 | 2009/01/01 |
110 | [네트워크] wol 기능을 이용해서 원격 접속하기 | 10977 | 2008/08/20 |
109 | [웹로그] 해당 디렉토리의 하위 디렉토리별 용량 알아보기 | 11016 | 2010/08/17 |
108 | [윈도우] 윈도우8 부팅 시 부팅 선택모드 복구메뉴 추가하기 | 11051 | 2013/06/24 |