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.
제목 | 날짜 | ||
---|---|---|---|
467 | [파일관리/압축] 대용량 파일전송 프로그램(FileZilla Server, serio, Berrys Webshare) | 3412 | 2015/01/21 |
466 | [기타] 인터넷공유기 KT 허브 | 3463 | 2017/06/26 |
465 | [GitHub] Git 을 사용해봅시다! (1부) [출처] Git 을 사용해봅시다! (1부) | 3510 | 2014/08/04 |
464 | [엑셀] 엑셀함수에서 1씩증가하여 인쇄하는법 | 3545 | 2019/02/03 |
463 | 오픈아이디 관련글 | 3549 | 2008/12/23 |
462 | [GitHub] 처음으로 깃/깃허브 설정하기 | 3575 | 2014/08/04 |
461 | [엑셀] 엑셀 vba if문 빠져나오기(break, exit) | 3790 | 2019/02/04 |
460 | [GitHub] 깃허브(GitHub) 시작하기 (by 이온디) | 3860 | 2014/08/23 |
459 | 동영상 변환하기 | 3876 | 2008/12/17 |
458 | REMOTE VIEWER | 3898 | 2008/08/30 |
457 | [윈도우] WindowsUpdate_80070011 오류 해결법 | 3910 | 2014/09/03 |
456 | 미니위니 플래시 뮤직박스 0.1 | 4059 | 2008/08/01 |