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.
제목 | 날짜 | ||
---|---|---|---|
263 | [기본] 탐색기 파일 목록 텍스트로 저장하기 | 7674 | 2007/10/23 |
262 | [사이트관리] 서브도메인을 라온넷에 연결하기 | 7693 | 2012/12/03 |
261 | [모바일] 스마트폰 어플계의 '히든 챔피언'을 소개합니다 [2] | 7791 | 2012/09/05 |
260 | [기본] SnagIt, Camtasia 무료 배포 | 7820 | 2007/12/04 |
259 | [기본] 플래시 시계 [2] | 7827 | 2007/12/10 |
258 | [하드웨어] 아이락스 키보드 구매기 | 7838 | 2009/05/10 |
257 | [하드웨어] V840 컴퓨터와 연결하기 | 7879 | 2009/05/17 |
256 | [모바일] 다음 웹툰 앱 등장! | 7887 | 2013/06/10 |
255 | [하드웨어] 아버지 컴퓨터 사양 | 7888 | 2007/10/07 |
254 | [브라우저] 파이어폭스 설치된 플러그인을 다른 컴퓨터에서도 사용하는 방법 | 7896 | 2007/10/27 |
253 | [웹로그] 초보자 파이어폭스 사용하기 및 기본적인 추천플러그인 (작성 중 임시) | 7903 | 2007/10/07 |
252 | [생활] CGV/롯데시네마/메가박스/프리머스 영화 싸게보는법! 재밌는 영화, 할인받아보자 | 7904 | 2013/12/16 |