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.
제목 | 날짜 | ||
---|---|---|---|
419 | [윈도우] 키보드 단축키로 제어판 소리 설정창 열기(실행 - 제어판 소리 설정) | 4985 | 2017/03/15 |
418 | 무료 mp3 다운 개소리 | 4995 | 2008/11/27 |
417 | [웹로그] 픽픽(PicPick) v1.7.2 Release | 5032 | 2007/10/22 |
416 | [웹로그] 웹의 도덕적 교육의 필요성 | 5073 | 2007/10/11 |
415 | [웹로그] 프로디지 7.1 LT 녹음하기 | 5079 | 2007/10/29 |
414 | [웹로그] 메일의 진화 | 5097 | 2007/11/06 |
413 | DaulSoft - GoreWan | 5119 | 2008/12/25 |
412 | [기본] 오픈아이디, 내 도메인으로도 활용 가능할까? | 5131 | 2007/11/07 |
411 | [기본] 윈도를 빠르게 끄자. | 5149 | 2007/11/08 |
410 | [기본] 각 블로그 포스팅에 대한 조회수를 설정해보자. | 5159 | 2007/11/08 |
409 | [윈도우] 윈도우7 윈도우8 사용자 폴더 이동하기(비추) [4] | 5173 | 2013/06/13 |
408 | [하드웨어] 새로 산 하드에 공진음이 들린다 | 5184 | 2014/02/15 |