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.
제목 | 날짜 | ||
---|---|---|---|
107 | [윈도우] 복구 콘솔을 하드에 설치하는 방법 | 11079 | 2008/08/30 |
106 | [텔넷] SSH 사용방법 - 리눅스 명령어 | 11107 | 2004/05/07 |
105 | [윈도우] 키보드로 클릭 대신하기 | 11125 | 2013/06/11 |
104 | [모바일] [안드로이드]할일 관리 어플, GTasks [1] | 11129 | 2011/11/14 |
103 | [기타] 각 포털사이트 별 서비스 비교 | 11152 | 2004/05/26 |
102 | [네트워크] 윈도우98 이용하는 컴에서 윈도우2000 이용하는 컴에 들어가는 방법 | 11163 | 2003/10/06 |
101 | [사이트관리] robots.txt 작성방법 | 11210 | 2009/07/01 |
100 | [미디어/녹음·재생] 윈도8 태블릿용 팟플레이어 추천 스킨 : 매트로X | 11260 | 2013/06/22 |
99 | [웹로그] BlogAPI를 이용해서 제로보드XE에 글 올리기 | 11275 | 2007/11/18 |
98 | [모바일] 에코모바일 3G접속과 MMS수신을 위한 APN설정 | 11335 | 2013/06/13 |
97 | [윈도우] '날씬하고 날렵하게' 윈도우7 최적화 실용 팁테크 | 11361 | 2011/11/23 |
96 | [웹로그] 알약 설치 후 - AYServiceNT.aye 라는 서비스는 왜 자동 시작되는 걸까? [3] [2] | 11378 | 2007/11/12 |