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.
제목 | 날짜 | ||
---|---|---|---|
311 | [기본] AppleMobileDeviceService.exe 아예 지워버리자 | 6804 | 2007/10/28 |
310 | [웹로그] 구글 애드센스 컨설팅 - 하데스님의 블로그 구글 애드센스 최적화 가이드 편 | 6838 | 2007/11/13 |
309 | [웹로그] 윈도를 빠르게 끄자. | 6860 | 2007/11/08 |
308 | [웹로그] ncloudblog님의 스킨 날짜 부분 따라하기 [1] | 6890 | 2007/11/21 |
307 | [웹로그] 인터넷 한글 폰트 [1] | 6899 | 2007/10/10 |
306 | [브라우저] 크롬 확장프로그램 추천, pig 툴바 | 6937 | 2013/02/01 |
305 | [웹로그] 사이트바 디자인 모음 | 6952 | 2009/08/12 |
304 | [웹로그] 이온디 파비콘 만들기 | 6973 | 2009/09/11 |
303 | [웹로그] 요즘 사용하고 있는 위젯형식의 개인화페이지 | 6998 | 2007/10/11 |
302 | [하드웨어] AMD 939소켓 사용하시는 분 계신가요? | 7016 | 2007/10/04 |
301 | [기본] 카스퍼스키 무료로 사용하기 | 7027 | 2007/10/23 |
300 | [윈도우] http://blog.naver.com/jijonx?Redirect=Log&logNo=110120912605 | 7029 | 2012/07/12 |