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.
제목 | 날짜 | ||
---|---|---|---|
503 | [윈도우서버] vultr 에 윈도우 서버 iso 사용하기 | 714 | 2017/04/17 |
502 | [Apm] 오토셋(autoset) 설치할 때 “MSVCR110.DLL” 문제 | 766 | 2015/08/29 |
501 | [GitHub] 카페24에서 github 다운로드 받는 방법 | 773 | 2018/08/02 |
500 | [엑셀] [엑셀]티켓 출력하기(일련번호 출력)-1 | 811 | 2019/02/03 |
499 | 리눅스 cp 명령어 사용법 정리 (파일, 디렉토리 복사, 백업) | 814 | 2020/12/12 |
498 | [윈도우] Windows 10 사용 중 DISM 도구 사용 시 0x800f081f 오류 | 826 | 2020/07/29 |
497 | [윈도우서버] [autoset] Autoset (오토셋) - MySQL「서버를 시작하지 못했습니다」에러 해결 (= Autoset, DB접속에러, 서버실행오류,Warning: mysqli_connect(): in ..Error, Connect Error:) | 833 | 2020/02/15 |
496 | [리눅스서버] 리눅스 소켓 접속 수 제한 풀기 | 837 | 2017/04/18 |
495 | [윈도우] svg viewer - 탐색기에서 바로 svg 아이콘 이미지로 보는 방법 | 888 | 2020/08/10 |
494 | [리눅스서버] mysql strict mode 끄기 | 888 | 2018/03/29 |
493 | [GitHub] 깃허브 오류 해결.. | 997 | 2015/06/29 |
492 | [엑셀] 무료 Excel 용 Kutools(Kutools for Excel) 대체 프로그램 8개 | 998 | 2019/02/03 |