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 | [기본] 알약 설치 후 - AYServiceNT.aye 라는 서비스는 왜 자동 시작되는 걸까? [1] | 8683 | 2007/11/12 |
214 | [PHP] HTTP 접속하는 PHP 클래스 (by CRIZIN) | 8707 | 2005/03/08 |
213 | [웹로그] Mysql 속도좀 빠르게 안되나요? 알려주세요 제발 흑흑 | 8728 | 2010/09/19 |
212 | 한글을 지원하는 무료 웹에디터, Kompozer | 8737 | 2013/03/28 |
211 | [하드웨어] 케이스 골라주세요. | 8774 | 2010/09/02 |
210 | [윈도우] 도스에서 드라이브 문자 변경하기 | 8783 | 2013/06/25 |
209 | [사이트관리] 무료 dns 서비스 | 8800 | 2013/03/02 |
208 | [웹로그] Mysql 속도에 영향을 미치는 컴파일/링크 방법 | 8823 | 2010/09/19 |
207 | [브라우저] IE 검색 페이지 사용자 지정..(윈2000,xp 용) | 8848 | 2005/03/04 |
206 | [유틸리티] dgw to jpg 변환 [1] | 8853 | 2011/11/15 |
205 | [브라우저] [Firefox 파이어폭스]사람들은 어떤 확장기능을 사용하고 있을까? | 8859 | 2007/10/29 |
204 | [기타] 페이팔 가입하기 | 8877 | 2013/03/16 |