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.
제목 | 날짜 | ||
---|---|---|---|
11 | [생활] 사진 정리(송현정) | 21991 | 2010/12/30 |
10 | [X61] 레노버 X61 무선 인터넷 제한됨 해결방법 (인텔 무선인터넷 드라이버 재설치) | 22080 | 2013/07/04 |
9 | [브라우저] 구글 크롬 플러스 마우스 오른쪽 버튼 해제하기(즐겨찾기 이용) | 22297 | 2011/05/14 |
8 | [텔넷] tar.gz, zip, rar 압축파일의 압축하기 및 압축풀기의 텔넷 명령어 | 23032 | 2004/05/01 |
7 | [모바일] [컬러링]skt 컬러링 설정하기 | 25126 | 2011/11/16 |
6 | [웹로그] svn이란? | 25968 | 2012/12/14 |
5 | [생활] 스타크래프트 뉴포커디펜스 팁 | 28181 | 2011/03/01 |
4 | 무료 FTP 사이트 | 29821 | 2007/11/20 |
3 | [윈도우] AppData 위치 경로 변경 이동(아이튠즈 때문에 c드라이브 용량 부족한 문제 해결방법)(강추) [1] | 32257 | 2011/08/29 |
2 | [텔넷] [추천]SSH 파일 관리 명령어 - 폴더,파일의 삭제 및 압축/해제 [4] | 56722 | 2007/03/30 |
1 | [네트워크] KT 기가 공유기 와이파이 비밀번호 및 관리자 설정 | 73557 | 2015/11/25 |