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.
제목 | 날짜 | ||
---|---|---|---|
215 | [리더] 리더의 조건 [4] | 5258 | 2014/02/17 |
214 | [모바일] 안드로이드 메모 어플 추천 | 4796 | 2014/04/30 |
213 | [생활] 도서관용 저소음(무소음) 마우스 만들기 대작전~!!!! [출처] 도서관용 저소음(무소음) 마우스 만들기 대작전~!!!!|작성자 양군 | 12430 | 2014/07/16 |
212 | [엑셀] 기본 서식 파일 Normal.dotm이(가) 변경되었습니다. 변경 사항을 저장하시겠습니까? [출처] 기본 서식 파일 Normal.dotm이(가) 변경되었습니다. 변경 사항을 저장하시겠습니까?|작성자 키롱 | 7908 | 2014/08/03 |
211 | [GitHub] 로컬 저장소와 깃허브 저장소 연결하기 | 3130 | 2014/08/04 |
210 | [GitHub] 처음으로 깃/깃허브 설정하기 | 3575 | 2014/08/04 |
209 | [GitHub] Git 온라인 저장소 만들기 | 5441 | 2014/08/04 |
208 | [GitHub] Git 을 사용해봅시다! (1부) [출처] Git 을 사용해봅시다! (1부) | 3510 | 2014/08/04 |
207 | [GitHub] 깃허브(GitHub) 시작하기 (by 이온디) | 3860 | 2014/08/23 |
206 | [윈도우] WindowsUpdate_80070011 오류 해결법 | 3910 | 2014/09/03 |
205 | [엑셀] 엑셀 시트간 입력값 비교하는 방법 | 3185 | 2014/11/17 |
204 | [데스크탑/액세서리] 네이버 캡쳐 Strokesplus 를 이용하기 | 3056 | 2014/11/21 |