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.
제목 | 날짜 | ||
---|---|---|---|
671 | [GitHub] 이미 push된 file .gitignore 적용하기 | 74 | 2022/01/01 |
670 | [GitHub] git의 .gitignore 사용방법 | 111 | 2021/12/29 |
669 | [jQuery] 텍스트 추출해서 링크 변환하기 | 130 | 2021/12/25 |
668 | HTML/CSS 스크롤바 숨기기 없애기 (스크롤 동작) | 328 | 2021/09/01 |
667 | xampp mysql 명령어 터미널에서 실행하는 방법 | 540 | 2021/02/05 |
666 | [GitHub] 간단한 깃 사용법 | 13 | 2021/02/01 |
665 | 리눅스 cp 명령어 사용법 정리 (파일, 디렉토리 복사, 백업) | 814 | 2020/12/12 |
664 | [리눅스서버] 리눅스 폴더별압축 디렉토리별 압축 | 1058 | 2020/12/12 |
663 | [리눅스서버] 수천 개의 파일이 포함 된 큰 디렉토리를 효율적으로 삭제 | 64 | 2020/12/07 |
662 | [윈도우] 윈도우 이 항목을 찾을 수 없습니다 삭제 방법 | 68 | 2020/11/29 |
661 | [리눅스서버] 리눅스 디렉토리별 용량 체크하는 방법 | 114 | 2020/11/26 |
660 | 무료환율 api | 0 | 2020/08/18 |