강좌
클라우드/리눅스에 관한 강좌입니다.
리눅스 분류

ncftpget강좌 7편: ncftpget으로 특정계정으로 원격서버에 접속하여 지정한 디렉토리의 모든 내용 통째로 가져오기

작성자 정보

  • 관리자 작성
  • 작성일

컨텐츠 정보

본문

ncftpget강좌 7: ncftpget으로 특정계정으로 원격서버에 접속하여 지정한 디렉토리의 모든 내용 통째로 가져오기

 

 

 

 

ncftpget을 이용하여 원격지의 서버의 특정 계정으로 접속하여 지정한 디렉토리의 모든 파일과 서브디렉토리들까지 통째로 한번에 가져올 수 있다.

 

 

 

즉 특정디렉토리의 내용을 통째로 가져오려면 -R옵션을 사용해야 한다.

 

 

 

 이번 예와 앞에서 설명하였던 anonymous로 접속하여 특정디렉토리를 통째로 가져오는 예와 비교해보기 바란다.

 

 

 

 

 

아래의 예는 192.168.0.100의 서버로 papa계정으로 접속하여 /home/papa/www/디렉토리를 통째로 모두 가져와서 /tmp/디렉토리에 저장하는 예이다.

 

 

 

 

 

[root@sulinux root]# ncftpget -u papa -R 192.168.0.100 /tmp/ /home/papa/www/

Password: **********

/tmp/www/domain.tar.gz:                                 20.49 kB  462.35 kB/s 

/tmp/www/index.html:                                    66.00 B    32.03 kB/s 

/tmp/www/domain/README:                                  1.40 kB  112.76 kB/s 

/tmp/www/domain/index.php:                             573.00 B   626.62 kB/s 

/tmp/www/domain/class/domain_class.php:                 14.76 kB    7.03 MB/s 

/tmp/www/domain/class/inc_class.php:                     5.73 kB    4.36 MB/s 

/tmp/www/domain/class/layout_class.php:                  4.73 kB    2.35 MB/s 

/tmp/www/domain/inc/config.php:                        997.00 B    81.33 kB/s 

/tmp/www/domain/inc/db_link.php:                       275.00 B   320.47 kB/s 

/tmp/www/domain/layout/default/content.html:             1.53 kB   98.81 kB/s 

/tmp/www/domain/layout/default/domain_form.html:         7.52 kB    2.99 MB/s 

/tmp/www/domain/layout/default/domain_list.html:         4.77 kB    4.06 MB/s 

/tmp/www/domain/layout/default/drop_form.html:           3.97 kB    4.11 MB/s 

/tmp/www/domain/layout/default/drop_list.html:           2.98 kB    3.32 MB/s 

/tmp/www/domain/layout/default/footer.html:            416.00 B   394.80 kB/s 

/tmp/www/domain/layout/default/header.html:              2.71 kB    3.09 MB/s 

/tmp/www/domain/layout/default/hosting_content.html:     3.15 kB    3.51 MB/s 

/tmp/www/domain/layout/default/login.html:               2.59 kB    2.94 MB/s 

/tmp/www/domain/layout/default/paging.html:              1.22 kB    1.40 MB/s 

/tmp/www/domain/layout/default/search.html:            637.00 B   740.56 kB/s 

/tmp/www/domain/layout/default/whois.html:               1.64 kB    1.89 MB/s 

...w/domain/layout/default/image/board_bg_flower.gif:    1.38 kB  225.35 kB/s 

/tmp/www/domain/layout/default/image/bright.gif:       108.00 B   117.84 kB/s 

/tmp/www/domain/layout/default/image/delete.gif:        97.00 B   109.76 kB/s 

/tmp/www/domain/layout/default/image/dot_line.gif:      52.00 B    50.73 kB/s 

/tmp/www/domain/layout/default/image/dot_ver.gif:       60.00 B    68.77 kB/s 

/tmp/www/domain/layout/default/image/font_domain.gif:  283.00 B   328.62 kB/s 

/tmp/www/domain/layout/default/image/icon_arrow.gif:    68.00 B    78.31 kB/s 

...www/domain/layout/default/image/icon_multiman.gif:  244.00 B   280.66 kB/s 

/tmp/www/domain/layout/default/image/layout_b.gif:       1.24 kB    1.42 MB/s 

/tmp/www/domain/layout/default/image/layout_c.gif:     166.00 B   192.99 kB/s 

/tmp/www/domain/layout/default/image/shadow.gif:        91.00 B   105.04 kB/s 

/tmp/www/domain/layout/default/image/tycoon.css:       934.00 B     1.05 MB/s 

/tmp/www/domain/layout/default/image/wrap_note_b.gif:  194.00 B   225.00 kB/s 

/tmp/www/domain/layout/default/image/wrap_note_c.gif:  139.00 B   160.64 kB/s 

/tmp/www/domain/layout/default/image/wrap_note_t.gif:  398.00 B   443.18 kB/s 

/tmp/www/domain/sql/domain.sql:                        755.00 B    59.71 kB/s 

[root@sulinux root]#

 

 

 

 

그리고 아래는 192.168.0.100서버의 /home/papa/www/디렉토리의 모든 내용을 가져온 후에 가져온 파일이 저장된 로컬서버의 /tmp/www/디렉토리를 확인한 것이다.

 

 

 

 

 

[root@sulinux root]# ls -l /tmp/www/

total 32

drwxr-xr-x    6 root     root         4096 Feb 17 17:22 domain

-rw-r--r--    1 root     root        20982 Jan  7 05:06 domain.tar.gz

-rw-r--r--    1 root     root           66 Nov 24 12:25 index.html

[root@sulinux root]#

 

 

 

 

 

관련자료

댓글 0
등록된 댓글이 없습니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,037 명
  • 현재 강좌수 :  35,803 개
  • 현재 접속자 :  128 명