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.
제목 | 날짜 | ||
---|---|---|---|
575 | [GitHub] github.io 페이지 만들기 | 157 | 2015/09/04 |
574 | [윈도우] hiberfil | 160 | 2015/09/10 |
573 | Cloudflare SSL 설정 #클라우드플레어 | 160 | 2017/08/17 |
572 | [리눅스서버] 리눅스 하위 디렉토리가 얼만큼 쓰는지 확인하는 명령어 | 166 | 2017/04/13 |
571 | [Nginx] https가 아닐 경우 https로 리다이렉트하는 방법 | 170 | 2018/04/25 |
570 | [기타] 마우스 캔버스 터치 사인 저장 | 173 | 2019/09/30 |
569 | [브라우저] 파이어폭스 오른쪽 클릭 | 184 | 2015/11/21 |
568 | [Nginx] NGINX REVERSE PROXY | 189 | 2017/10/15 |
567 | [사이트관리] 웹사이트 보안검사 멀웨어 체크 / 웹사이트 악성코드 검사방법 | 191 | 2019/03/01 |
566 | [GitHub] warning: LF will be replaced by CRLF in hello1.txt. | 194 | 2020/05/09 |
565 | [엑셀] 엑셀 셀병합 단축키 만들기, 엑셀 병합 단축키 | 195 | 2019/02/04 |
564 | [사이트관리] 홈페이지에 옐로아이디 카카오톡 링크 추가하기 | 197 | 2015/08/21 |