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.
제목 | 날짜 | ||
---|---|---|---|
95 | [생활] 면티 세탁 시 목이 안 늘어지게 하는 방법 | 11387 | 2004/05/11 |
94 | [윈도우] 파일삭제 확인을 뜨지 않게 하기 | 11416 | 2007/11/25 |
93 | [윈도우] 윈도우7 시스템 리소스 확인하기 | 11451 | 2013/03/04 |
92 | [사이트관리] www 로 접속하면 떼고 접속하기 [1] | 11461 | 2009/01/13 |
91 | [윈도우] 도스에서 드라이버 레터 고정하기 [1] | 11507 | 2010/07/12 |
90 | [유틸리티] Winamp Preferences (윈엠프 설정) | 11512 | 2003/07/12 |
89 | [브라우저] 파이어폭스에서 맞춤법 체크하기 | 11519 | 2010/11/16 |
88 | [기타] 영남대학교 자유게시판 RSS | 11539 | 2009/01/21 |
87 | [웹로그] MySQL euc-kr, latin1 문자코드 UTF-8로 컨버팅 하기 [1] | 11559 | 2010/09/17 |
86 | [텔넷] MySQL 비밀번호 변경하기 | 11569 | 2010/12/02 |
85 | [윈도우] 윈도우 하드를 다른 컴퓨터로 이동해서 사용하기 | 11599 | 2008/08/30 |
84 | [윈도우] 사용하고 있는 제품 버전을 확인하는 방법 | 11619 | 2003/08/13 |