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.
제목 | 날짜 | ||
---|---|---|---|
323 | [기타] 이클립스 Failed to crate the java machine 해결 방법 질문입니다. [1] | 6447 | 2013/11/11 |
322 | [웹로그] 테터툴즈 및 티스토리 도움말 링크 페이지 | 6513 | 2006/05/31 |
321 | [웹로그] 환율, 좀 올라주면 안되겠니? [1] | 6527 | 2007/11/07 |
320 | [웹로그] DB 백업&복원 | 6533 | 2010/08/17 |
319 | [기본] 웹페이지 동영상 주소 알아내기 | 6547 | 2007/11/25 |
318 | 디퓨젼 디더(Diffusion Dither) 사용을 이해하기 | 6559 | 2007/11/25 |
317 | [웹로그] Daum 캘린더, 이런 기능 어떨까? [2] | 6607 | 2007/11/20 |
316 | [하드웨어] 고장난 컴퓨터 | 6625 | 2007/10/08 |
315 | [하드웨어] 업어온 아버지의 PC | 6700 | 2007/10/07 |
314 | [웹로그] 카스퍼스키 무료로 사용하기 | 6769 | 2007/10/23 |
313 | 네이버 오픈API 책검색 | 6784 | 2007/09/17 |
312 | [웹로그] 내가 사용하는 프로그램 | 6789 | 2009/09/11 |