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.
제목 | 날짜 | ||
---|---|---|---|
71 | [X61] 빨콩 드라이버 업데이트 | 12107 | 2009/03/13 |
70 | [브라우저] 크롬 확장 프로그램, imgur | 12115 | 2013/02/27 |
69 | [데스크탑/액세서리] 윈도우7에서 탐색기 오른쪽버튼으로 그림, 사진 미리보기 | 12121 | 2010/07/26 |
68 | [PHP] http.php [1] | 12144 | 2005/03/08 |
67 | [브라우저] 문맥메뉴 이용해서 메일 보내기..는 아니지만;; | 12256 | 2011/02/26 |
66 | [브라우저] 파이어폭스에 원하는 검색사이트 등록하기 | 12414 | 2010/11/16 |
65 | [생활] 도서관용 저소음(무소음) 마우스 만들기 대작전~!!!! [출처] 도서관용 저소음(무소음) 마우스 만들기 대작전~!!!!|작성자 양군 | 12430 | 2014/07/16 |
64 | [브라우저] 인터넷 익스플로러 8에서 탭 빨리 열기 | 12467 | 2010/03/17 |
63 | [메신저] 엠에센(MSN) 비번 정보 바꾸기 | 12485 | 2003/01/10 |
62 | [브라우저] 파이어폭스 Alt+S 사용하기 | 12509 | 2007/03/31 |
61 | [기본] 지오 공유기 설정방법 | 12559 | 2009/10/30 |
60 | [메뉴얼] A8N-E 메인보드 메뉴얼 | 12573 | 2010/01/20 |