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.
제목 | 날짜 | ||
---|---|---|---|
671 | [텔넷] SSH 사용방법 - 리눅스 명령어 | 11107 | 2004/05/07 |
670 | [생활] 면티 세탁 시 목이 안 늘어지게 하는 방법 | 11387 | 2004/05/11 |
669 | [브라우저] IE 인코딩 고정하기 [6] | 18435 | 2004/05/22 |
668 | [기타] 각 포털사이트 별 서비스 비교 | 11152 | 2004/05/26 |
667 | [텔넷] 텔넷에서 DB (mysql) 접속하는 방법 | 13257 | 2004/05/30 |
666 | [유틸리티] IEToy를 이용해서 링크 던지기 (by 위쯔) | 9118 | 2004/06/08 |
665 | [윈도우] 컴퓨터 사용 도중 Runtime Library 오류가 뜰 때 | 11827 | 2004/11/22 |
664 | [엑셀] [엑셀]시트 간 이동 - ctrl + PageUp/Down | 8979 | 2004/12/08 |
663 | [백신/악성코드/보안] 에디터플러스를 이용한 VBS.WHITEHOME 바이러스 치료방법 | 8599 | 2005/03/04 |
662 | [미디어/녹음·재생] 윈도우 미디어 인코더를 이용한 mpg동영상을 wmv로 인코딩하기 [1] | 10472 | 2005/03/04 |
661 | [브라우저] IE 검색 페이지 사용자 지정..(윈2000,xp 용) | 8848 | 2005/03/04 |
660 | [윈도우] 윈2000에서 넷미팅사용시 아이콘이 256색을 계속 유지할 경우 고치는 방법 | 16698 | 2005/03/04 |