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.
제목 | 날짜 | ||
---|---|---|---|
359 | [기본] 판도라동영상 OpenAPI 사용후기 [1] | 5962 | 2007/11/29 |
358 | [웹로그] 손바닥에 땀, 어떻게 할까? | 5964 | 2007/11/03 |
357 | [웹로그] Play Street 에 참여할 의사가 있으신지요? | 5964 | 2007/10/02 |
356 | 메인보드 전원 케이블 연결 | 5979 | 2008/08/30 |
355 | [웹로그] 적당한 마우스 스크롤의 양 | 5985 | 2007/10/31 |
354 | [사이트관리] Apache 서버 .htaccess 활용(접근 제어 - 아이피 제어) | 5995 | 2014/02/09 |
353 | [기본] 시작프로그램 관리 & 모니터링 | 5999 | 2007/10/21 |
352 | [웹로그] 왜임마 사용하기 #1 [2] | 6004 | 2007/11/27 |
351 | [모바일] 갤럭시노트2(shv-e250s) 키스(스마트스위치)로 백업하기 | 6048 | 2016/02/05 |
350 | [기본] 내 블로그에 Add to Diigo를 넣어보자 [2] | 6056 | 2007/11/25 |
349 | [웹로그] 컴퓨터 관련 팁을 올려놓은 블로거 | 6063 | 2007/11/05 |
348 | [윈도우] SSD 드라이브 최적화 | 6079 | 2013/06/22 |