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.
제목 | 날짜 | ||
---|---|---|---|
23 | [워드프로세서] 지정된 경로를 찾을 수 없습니다 | 16906 | 2009/10/10 |
22 | [윈도우] SkyDrive 편리하게 사용하기(윈도우 탐색기로 이용하는 방법) | 18237 | 2011/04/02 |
21 | [미디어/녹음·재생] flac mp3 변환 | 18370 | 2011/01/28 |
20 | [브라우저] IE 인코딩 고정하기 [6] | 18435 | 2004/05/22 |
19 | [브라우저] 파이어폭스 추천 확장기능 [2] [1] | 18573 | 2007/11/12 |
18 | [생활] 고등학교 졸업증명서 인터넷으로 출력가능합니다(공인인증서 필요!!!!).~~ | 18823 | 2007/09/10 |
17 | [웹로그] 프로젝트에서 마일스톤이란? | 18841 | 2012/12/14 |
16 | [윈도우] Program Files 저장 위치 바꾸기 | 18901 | 2010/07/26 |
15 | [브라우저] 구글 크롬 플러스에서 오른쪽 마우스 해제 하기(플러그인 이용) [1] | 19013 | 2011/05/14 |
14 | [윈도우] 윈도우 7 64비트 서비스팩1 설치 실패 | 19501 | 2013/10/29 |
13 | [기본] 중국으로 문자 보내기 [11] | 20332 | 2010/09/11 |
12 | [생활] 효과적인 사진 폴더 정리 비법. | 21523 | 2010/12/30 |