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.
제목 | 날짜 | ||
---|---|---|---|
335 | [웹로그] 오픈아이디, 내 도메인으로도 활용 가능할까? | 6272 | 2007/11/07 |
334 | [웹로그] 각 블로그 포스팅에 대한 조회수를 설정해보자. | 6288 | 2007/11/08 |
333 | [기본] 적당한 마우스 스크롤의 양 | 6325 | 2007/10/31 |
332 | [웹로그] jwFN에 바라는 기능 [2] | 6345 | 2007/11/05 |
331 | [웹로그] 작업관리자에서 필요없는 실행프로세서를 죽이자. [1] | 6357 | 2007/10/28 |
330 | [웹로그] 애드센스 | 6377 | 2009/09/19 |
329 | [기본] Daum 캘린더로 수능 일정 공유해요! [2] | 6407 | 2007/11/20 |
328 | [기본] MP3 무제한 다운로드 송사리 | 6407 | 2007/11/12 |
327 | [웹로그] 컴퓨터로 라디오 듣기 | 6409 | 2007/10/24 |
326 | [웹로그] 우리지역 도서관 이용해보자. | 6417 | 2007/10/07 |
325 | [웹로그] 파이어폭스로 EBS 로그인하기 [2] | 6427 | 2008/01/12 |
324 | [기본] DIV 에 마우스 오버 시 색상 바꾸기 | 6438 | 2007/11/22 |